|
i applied an overtime from 5:48 PM 7/21/2003 to 2:00 AM 7/22/2003. how can i get the total number of hours including minutes.
|
|
|
datediff(Minute,dateTime1, dateTime2)
will return the number of minutes, to get the number of hours, use the above function / 60
to get the minutes in the hour, take the above function MOD 60
Since datediff and the / 60 are both integers I _assume_ an integer return type, but I haven`t tried it before.
Hope this works,
-Mike
|
|
|
By the way, if by change datediff(...) / 60 doesn`t return an integer you can always use the FLOOR(datediff(...) / 60) to get the integer result.
-Mike
|
|
|
|
|
|
|
|
|
|