My Assistant
![]() ![]() |
|
|
Mar 9 2005, 04:11 PM
Post
#1
|
|
|
New Member Posts: 16 |
I am working on a punch in punch out feature for a projects db I am working on & I can not figure out how to calculate the hours between the check out date & check in dates. Any ideas or snippets?
|
|
|
|
Mar 9 2005, 04:26 PM
Post
#2
|
|
|
UA Forum Administrator Posts: 38,073 From: Birmingham, Alabama USA |
Use the DateDiff() function to return the elasped time ...
RDH |
|
|
|
Mar 9 2005, 04:26 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 3,893 From: Lansing, Michigan, USA |
Try the DateDiff function, assuming your check in and check out dates are actual date/time values.
DateDiff("h", CheckIn, CheckOut) -AJ |
|
|
|
Mar 9 2005, 04:49 PM
Post
#4
|
|
|
New Member Posts: 16 |
That works perfect! One more quickie, how do I get it to be a positive num instead of a negetive?
|
|
|
|
Mar 9 2005, 05:23 PM
Post
#5
|
|
|
UA Forum Administrator Posts: 38,073 From: Birmingham, Alabama USA |
You need to reverse your date values in the function arguments ...
The start date/time is should be first .. then the end date/time .. RDH |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 10:33 PM |