Parse a date like “13 mars 2021”?

I read both ParseDate and DateTime.FromString from the LR and as far as I understand, it is not possible to pass a date with this format:

13 mars 2021

Can you confirm that I must convert this kind of dates by myself ?

Tested this code and it looks like it works:

Var locale As New Locale("fr-FR")
Var mydate As DateTime = DateTime.FromString("13 mars 2021", locale)
3 Likes

Thank you Alberto.

This needs to go to the LR.

I was hopeless and think I had to parse it manually ;-:slight_smile:

That information is in the LR.

I still not have my new glasses so I do not saw it there.

Yes it is !

https://documentation.xojo.com/api/data_types/datetime.html#datetime-fromstring