A Albi Active Member Licensed User Longtime User Mar 31, 2015 #1 I'm using B4i but perhaps this applies to B4A as well... I'm getting what appears to be an extra hour when I return this: B4X: DateTime.Time(endTime-startTime) compared to this: B4X: ((endTime-startTime)/(1000*60)) e.g. the top one returns 01:00:25 while the second returns 0.425 when the time difference is about 25 seconds. I think i must be not understanding something about datetime's so the answer as to what is happening would be great
I'm using B4i but perhaps this applies to B4A as well... I'm getting what appears to be an extra hour when I return this: B4X: DateTime.Time(endTime-startTime) compared to this: B4X: ((endTime-startTime)/(1000*60)) e.g. the top one returns 01:00:25 while the second returns 0.425 when the time difference is about 25 seconds. I think i must be not understanding something about datetime's so the answer as to what is happening would be great
Erel B4X founder Staff member Licensed User Longtime User Apr 1, 2015 #2 It is a mistake to use DateTime.Time with a duration value. You can use the code posted here to covert a duration to a string: https://www.b4x.com/android/forum/threads/confused-by-datetime.17437/#post-99934 Upvote 0
It is a mistake to use DateTime.Time with a duration value. You can use the code posted here to covert a duration to a string: https://www.b4x.com/android/forum/threads/confused-by-datetime.17437/#post-99934