What is the best / most used way to handle dates across the globe?
An app I am working on will be used in the States as well as the UK.
15 December 2019 would be 15/12/19 in the UK and 12/15/19 in the States
What is the best / most used way to handle dates across the globe?
An app I am working on will be used in the States as well as the UK.
15 December 2019 would be 15/12/19 in the UK and 12/15/19 in the States
Store them In UTC and format to local time zone for display only.
Thanks Christian,
I was thinking more about input, if your app doesn’t use datepickers how do I tell if 5/10 is 5th October or 10th May?
Check the logged in users locale and format settings and adapt to them.
Take a look at the DateTime.FromString and DateTime.ToString methods. These automatically handle juggling the correct value based on the user’s given OS preference, e.g., US or UK formats/localizations.
I hope that helps.
[quote=468938:@Scott Cadillac]Take a look at the DateTime.FromString and DateTime.ToString methods. These automatically handle juggling the correct value based on the user’s given OS preference, e.g., US or UK formats/localizations.
I hope that helps.[/quote]
Thanks Scott, I’ll read the LR on those.