Welcome to the Make community!
I suggest translating the date string to English first.
You should be able to do it inline using eight nested replace functions to replace the month names, before the parseDate function.
e.g.:
{{replace(replace(replace(replace(replace(replace(replace(replace(3.Variable;"Januar";"January");"Februar";"February");"März";"March");"Mai";"May");"Juni";"June");"Juli";"July");"Oktober";"October");"Dezember";"December")}}
Module Export
You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.
-
Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.
-
Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.
View Module Export Code
JSON
{
"subflows": [
{
"flow": [
{
"id": 54,
"module": "util:ComposeTransformer",
"version": 1,
"parameters": {},
"mapper": {
"value": "Raum Hamburg - Montag, 01. März 2024"
},
"metadata": {
"designer": {
"x": -728,
"y": -1453
},
"restore": {},
"expect": [
{
"name": "value",
"type": "text",
"label": "Text"
}
]
}
},
{
"id": 56,
"module": "util:SetVariables",
"version": 1,
"parameters": {},
"mapper": {
"variables": [
{
"name": "date",
"value": "{{parseDate(replace(replace(replace(replace(replace(replace(replace(replace(trim(last(split(54.value; \",\"))); \"Januar\"; \"January\"); \"Februar\"; \"February\"); \"März\"; \"March\"); \"Mai\"; \"May\"); \"Juni\"; \"June\"); \"Juli\"; \"July\"); \"Oktober\"; \"October\"); \"Dezember\"; \"December\"); \"DD. MMMM YYYY\")}}"
}
],
"scope": "roundtrip"
},
"metadata": {
"designer": {
"x": -486,
"y": -1449
},
"restore": {
"expect": {
"variables": {
"items": [
null
]
},
"scope": {
"label": "One cycle"
}
}
},
"expect": [
{
"name": "variables",
"type": "array",
"label": "Variables",
"spec": [
{
"name": "name",
"label": "Variable name",
"type": "text",
"required": true
},
{
"name": "value",
"label": "Variable value",
"type": "any"
}
]
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
}
],
"interface": [
{
"name": "date",
"label": "date",
"type": "any"
}
]
}
}
]
}
],
"metadata": {
"version": 1
}
}
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!