hello,
to check the DateUtils.SetDateAndTime2 timestamp,
I had trying that code :
so, wrong result.
but if i delete the last 3 digit of the timestamp long number:
the result is ok
please where im wrong ?
Regards, Michel
to check the DateUtils.SetDateAndTime2 timestamp,
I had trying that code :
B4X:
'for the datetime = 08/05/2019 14:43:00
Dim mats As Long = DateUtils.SetDateAndTime2(2019, 8, 5, 14, 43, 0, 1) 'with UTC/GMT + 1
Log(mats) 'return : 1565012580000
Dim MyDate As Long = DateUtils.UnixTimeToTicks(mats)
Log(DateTime.Date(MyDate) & " " & DateTime.time(MyDate))
'return : 11/4/51563 12:40:00
but if i delete the last 3 digit of the timestamp long number:
B4X:
'for the datetime = 08/05/2019 14:43:00
Dim mats As Long = DateUtils.SetDateAndTime2(2019, 8, 5, 14, 43, 0, 1)
Log(mats) 'return : 1565012580000
mats = mats / 1000 ' for : 1565012580 instead 1565012580000
Dim MyDate As Long = DateUtils.UnixTimeToTicks(mats)
Log(DateTime.Date(MyDate) & " " & DateTime.time(MyDate))
'return : 08/05/2019 13:43:00
please where im wrong ?
Regards, Michel