Format of dates

String documentation says date time uses Mac system format but does not. It always returns yy/mm/dd format. I want April 1, 2022. Any ideas please

Try

Var d As DateTime = DateTime.Now
Var s As String = d.ToString(Locale.Current, DateTime.FormatStyles.Long, DateTime.FormatStyles.None)

Thanks, Alberto. Works a treat - I would never have found this solution without your aid.

1 Like

Glad I was able to help. You can find more information here:
https://documentation.xojo.com/api/data_types/datetime.html#datetime-formatstyles