A AllanH Member Licensed User Longtime User Oct 5, 2021 #1 I use the tPreferencesDialog for a few preferences One is a date My app is used all round the world so I need it to conform with regional settings. Locally, I'm dd/MM/yyyy but the preference dialog seems to default to MM/dd/yyyy I'm loading the dialog from a json Code: Copy Sub Class_Globals Public prefdialog As PreferencesDialog ... Private Sub B4XPage_Created (Root1 As B4XView) prefdialog.Initialize(Root, "Settings", 300dip, 300dip) prefdialog.LoadFromJson(File.ReadString(File.DirAssets, "settings.json")) How do I regionalise the date? Thanks
I use the tPreferencesDialog for a few preferences One is a date My app is used all round the world so I need it to conform with regional settings. Locally, I'm dd/MM/yyyy but the preference dialog seems to default to MM/dd/yyyy I'm loading the dialog from a json Code: Copy Sub Class_Globals Public prefdialog As PreferencesDialog ... Private Sub B4XPage_Created (Root1 As B4XView) prefdialog.Initialize(Root, "Settings", 300dip, 300dip) prefdialog.LoadFromJson(File.ReadString(File.DirAssets, "settings.json")) How do I regionalise the date? Thanks
William Lancee Well-Known Member Licensed User Longtime User Oct 5, 2021 #2 There is a App-wide setting that is used whenever DateTime is used. All B4X libraries involving dates use it. It also can be changed before DateTime is invoked (and changed back after if needed). The formats can be found in the intellisense prompt. B4X: Copy DateTime.DateFormat = "dd-MM-yyyy"
There is a App-wide setting that is used whenever DateTime is used. All B4X libraries involving dates use it. It also can be changed before DateTime is invoked (and changed back after if needed). The formats can be found in the intellisense prompt. B4X: Copy DateTime.DateFormat = "dd-MM-yyyy"
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2021 #3 Please start a new thread in the questions forum.