Here's a test sub:
Here's the output:
I'm completely confused. Can anybody replicate this weirdness? And how do I fix it?
B4X:
Sub testDateFormats
Private dstr As String
Private dlong As Long
Private mystr As String
dstr = "3/28/2022"
DateTime.DateFormat = "MM/dd/YYYY"
dlong = DateTime.DateParse(dstr)
DateTime.DateFormat = "YYYY.MM.dd"
mystr = DateTime.Date(dlong)
Log(dstr & " =? " & mystr)
End Sub
Here's the output:
B4X:
3/28/2022 =? 2022.12.26
I'm completely confused. Can anybody replicate this weirdness? And how do I fix it?