DateTime.DateFormat="yyyy-mm-dd"
DateTime.timeformat = "hh:mm"
Dim MyDate As String = "2022-04-18"
Dim Mytime As String = "10:00"
Dim MyTicks As Long = DateTime.DateTimeParse(MyDate, Mytime)
Log(DateTime.Date(MyTicks)) 'shows 2022-04-18 10:00 so ticks are correct
RaceDate.Ticks = MyTicks'ThisRace.StartDate) 'racedate is the DatePicker'
The above code causes the datepicker to read: January 18, 2022 10:00 AM
See screenshot.
Is this a bug in Datepicker, or have I done something wrong?
DateTime.DateFormat="yyyy-mm-dd"
DateTime.timeformat = "HH:mm"
Dim MyDate As String = "2022-04-15"
Dim Mytime As String = "13:55"
Log (MyDate & " " & Mytime)
Dim MyTicks As Long = DateTime.DateTimeParse(MyDate, Mytime)
Log(DateTime.Date(MyTicks))
Log(DateTime.time(MyTicks))
The log:
2022-04-15 13:55
2022-59-15
13:59
I tried it in B4A and got the same result. I expected it to work.