|
 |
access thread: Time Difference
Message #1 by pmcmillin@m... on Mon, 11 Jun 2001 11:04:43 -0500
|
|
I am needing the formula to calculate the difference in hrs and
minutes. This is being used as a time clock. Where an employee types in
their time they arrive, amount of time taken for lunch hr and the time they
leave. e.i. 8:00 am - 6:00 pm and 1 hr for lunch. I need to know the
number of hrs and minutes worked.
Pam McMillin
Systems Technician
Schlumberger - IPM Asset Management
500 W. Texas, Suite 500
P.O. Box 2726
Midland, TX 79702-2726
Office 915/571-4600
Cell 915/556-0749
Fax 915/571-4788
pmcmillin@m...
Message #2 by "Carl Schwarcz" <carl@s...> on Mon, 11 Jun 2001 10:16:50 -0700
|
|
Have a look at the DatePart function:
DatePart(interval, date[,firstdayofweek[, firstweekofyear]])
It would allow you extract the number of hours and minutes from a date
and do you calculation.
Alternativeley you can check out the DateDiff function:
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
Which allows you to subtract one date from the other...
-----Original Message-----
From: Pam McMillin [mailto:pmcmillin@m...]
Sent: Monday, June 11, 2001 9:19 AM
To: Access
Subject: [access] Time Difference
I am needing the formula to calculate the difference in hrs and
minutes. This is being used as a time clock. Where an employee types
in
their time they arrive, amount of time taken for lunch hr and the time
they
leave. e.i. 8:00 am - 6:00 pm and 1 hr for lunch. I need to know the
number of hrs and minutes worked.
Pam McMillin
Systems Technician
Schlumberger - IPM Asset Management
500 W. Texas, Suite 500
P.O. Box 2726
Midland, TX 79702-2726
Office 915/571-4600
Cell 915/556-0749
Fax 915/571-4788
pmcmillin@m...
Message #3 by "John Ruff" <papparuff@c...> on Mon, 11 Jun 2001 15:02:12 -0700
|
|
Pam,
Go to Url
http://support.microsoft.com/support/kb/articles/Q130/5/14.asp?LN=EN-US&SD=g
n&FR=0&qry=Calculating%20and%20Displaying%20Date/Time%20Values&rnk=3&src=DHC
S_MSPSS_gn_SRCH&SPR=ACC97
It provides information and code on computing dates and times and is exactly
what you are looking for.
If you cannot read the full Url above, go to www.Microsoft.com > Support >
Knowledgebase
Select Specific article ID number then type Q13054 in the "My question is:"
block.
This is Microsoft Knowledgebase Article ID Q130514
John Ruff - The Eternal Optimist :)
-----Original Message-----
From: Pam McMillin [mailto:pmcmillin@m...]
Sent: Monday, June 11, 2001 9:19 AM
To: Access
Subject: [access] Time Difference
I am needing the formula to calculate the difference in hrs and
minutes. This is being used as a time clock. Where an employee types in
their time they arrive, amount of time taken for lunch hr and the time they
leave. e.i. 8:00 am - 6:00 pm and 1 hr for lunch. I need to know the
number of hrs and minutes worked.
Pam McMillin
Systems Technician
Schlumberger - IPM Asset Management
500 W. Texas, Suite 500
P.O. Box 2726
Midland, TX 79702-2726
Office 915/571-4600
Cell 915/556-0749
Fax 915/571-4788
pmcmillin@m...
|
|
 |