How do I convert a Date I receive from the SQL query on the fly?
I connect to the Database and get a collection (!) of three values: StartDate, EndDate and Desctiption. All I need is to write a message like
You start on 19/06 and end on 21/06 with <<>Description>
Then output it using magic repeat, which works just fine.
However, I get the date in ISO 8601 format and instead of tidy message as wanted above I get a terrible
You start on Tue Jun 19 2018 00:00:00 GMT+0100 and end on Thu Jun 21 2018 00:00:00 GMT+0100 with <<>Description>
All I need is to change the Date, which I can do with Format Date, but it only works with the first item in the collection (i.e. StartDate). The EndDate stays weird and all further sets (I may have many which is why using magic repeat is vital) stay long and unreadable.
How do I convert every Date in a collection I receive into a DD/MM (or DD/MM/YY if it is any easier) format and output it.
I thought about adding a function into my currently working code:
You start on {{run_a_query.result__rows__0__StartDate *}} and end on {{run_a_query.result__rows__0__EndDate *}} with {{run_a_query.result__rows__0__Description *}}
like
You start on {{run_a_query.format_date.date.result__rows__0__StartDate *}} and end on {{run_a_query.format_date.date.result__rows__0__EndDate *}} with {{run_a_query.result__rows__0__Description *}}
But any corrections do not seem to work… Any ideas here? I believe I am not the one who wants to output a collection of dates in an understandable format…