Parse an ISO-8601 Date (2022-04-30T22:00:00.000Z) to an Date Attribute during an csv Import

0
Hello, how can i parse an  ISO-8601 Date String (2022-04-30T22:00:00.000Z) to an “Date and Time” Attribute. The ISO-8601 date string is created via a csv import. I would now like to convert this "Date String" back to an "Date and time" attribute. That can not be that hard.. Mendix knows this ISO-8601 date string.. Mendix itself represents a date like this..   how can i do it?
asked
2 answers
3

Give the following a try…

 

parseDateTime($YourDateTime, 'yyyy-MM-dd''T''HH:mm:ss.SSSZ')


Behind the scenes Mendix is using Java’s SimpleDateFormat class, and this is given as an example there.

Hope this helps.

answered
1

Hello Robert,

thank you for your answer!!

I just had to change the little blemish ;)
 

parseDateTime($Iterator/date, 'yyyy-MM-dd''T''HH:mm:ss.SSS''Z''')


Thank you so much

answered