G Giuliano Cucchiarini Member Licensed User Longtime User Sep 4, 2014 #1 From the documentation, I read that Android DateTime returns a Long value indicating the milliseconds from 1/1/1970. I do not understand the reason why if I set the Number of Ticks to 0 I get the data 1/1/1970 1:0:0 (I was expecting 1/1/1970 0:0:0) Dim Ticks as long=0 Dim H as int=DateTime.GetHour(t) ' I get 1 Thank You Giuliano C.
From the documentation, I read that Android DateTime returns a Long value indicating the milliseconds from 1/1/1970. I do not understand the reason why if I set the Number of Ticks to 0 I get the data 1/1/1970 1:0:0 (I was expecting 1/1/1970 0:0:0) Dim Ticks as long=0 Dim H as int=DateTime.GetHour(t) ' I get 1 Thank You Giuliano C.
LucaMs Expert Licensed User Longtime User Sep 4, 2014 #2 http://www.b4x.com/android/forum/threads/confused-by-datetime.17437/#post-99934 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 4, 2014 #4 Don't try to do date / time arithmetic. It doesn't work (at least with resolutions larger than hours). Check DateUtils module. Upvote 0
Don't try to do date / time arithmetic. It doesn't work (at least with resolutions larger than hours). Check DateUtils module.