Hi,
I have a problem in Navision 3.10.
Say we have 4 variables:
Date1 - date someone enter the room
Time1 - time someone enter the room
Date2 - date someone exit the room
Time2 - time someone exit the room
I want to calculate the difference between Date1, Time1 and Date2, Time2.
The result could be something like this:
1 day 2 hours 12 minutes 12 sec.
I can't use the DateTime variable and CREATEDATETIME function
because it is not supported in Navision 3.10.
How do I do this.
Thanks in advance.
0
Comments
Greez Warfox
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
86400000 = 24(hours) * 60(minutes) * 60(seconds) * 1000(miliseconds)
date2 - date1 returns integer representing days. after multiplying with 86400000, result is integer representing miliseconds.
time2 -time1 returns integer representing milisecond.
so at the end we have difference in miliseconds.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯