calculation of two different time

  • Thread starter Thread starter nathan
  • Start date Start date
N

nathan

im developing a payroll system which involve time calculation of the time IN,
time OUT, and office hours.

example: calculating the number of minutes/hours late or overtime per day
for the period of 1 month.

Hope you can help me formulate the proper formula for this calculation using
MS ACCESS 2003.

Thank you.
 
Nathan, are you sure you want to go to the trouble of programming this
yourself, when there are proably professional packages available that meet
all the legal requirements in your country?

The basic approach is to use DateDiff() in a query to calculate the number
of minutes. Then divide by 60 to get hours-and-fractions of an hour.

Example, assuming Date/Time fields that contain both the date and time:
Hours: DateDiff("n", [StartDateTime], [EndDateTime]) / 60

This example avoids several traps, e.g.:
- Doesn't use field names that are reserved (such as IN.)

- Copes with shifts that roll past midnight (by storing the date and time in
the same field)

- Doesn't store the calculated duration result in a table field.
(Could be inconsistent with the calculation if you did.)

Things get more complex when you add penalty rates, overtime, non-standard
shifts, public holidays, sick-leave, paid annual leave for part/full timers
(as distinct from casual), tiered pay scales, taxation, commissions,
absenteeism, voluntary salary sacrifice, periodic changes in pay scales,
awards, non-standard work agreements, bonues, danger penalties,
superanuation, and hosts of other issues.
 
Please Help me about time calculation
im developing a payroll system which involve time calculation of the time IN,
time OUT, and office hours.

example: calculating the number of minutes/hours late or overtime per day
for the period of 1 month.

Hope you can help me formulate the proper formula for this calculation using
MS ACCESS 2003.

Thank you.
On Wednesday, January 28, 2009 2:14 AM Allen Browne wrote:
Nathan, are you sure you want to go to the trouble of programming this
yourself, when there are proably professional packages available that meet
all the legal requirements in your country?

The basic approach is to use DateDiff() in a query to calculate the number
of minutes. Then divide by 60 to get hours-and-fractions of an hour.

Example, assuming Date/Time fields that contain both the date and time:
Hours: DateDiff("n", [StartDateTime], [EndDateTime]) / 60

This example avoids several traps, e.g.:
- Doesn't use field names that are reserved (such as IN.)

- Copes with shifts that roll past midnight (by storing the date and time in
the same field)

- Doesn't store the calculated duration result in a table field.
(Could be inconsistent with the calculation if you did.)

Things get more complex when you add penalty rates, overtime, non-standard
shifts, public holidays, sick-leave, paid annual leave for part/full timers
(as distinct from casual), tiered pay scales, taxation, commissions,
absenteeism, voluntary salary sacrifice, periodic changes in pay scales,
awards, non-standard work agreements, bonues, danger penalties,
superanuation, and hosts of other issues.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

news:[email protected]...
 
Please Help me about time calculation
im developing a payroll system which involve time calculation of the time IN,
time OUT, and office hours.

example: calculating the number of minutes/hours late or overtime per day
for the period of 1 month.

Hope you can help me formulate the proper formula for this calculation using
MS ACCESS 2003.

Thank you.
On Wednesday, January 28, 2009 2:14 AM Allen Browne wrote:
Nathan, are you sure you want to go to the trouble of programming this
yourself, when there are proably professional packages available that meet
all the legal requirements in your country?

The basic approach is to use DateDiff() in a query to calculate the number
of minutes. Then divide by 60 to get hours-and-fractions of an hour.

Example, assuming Date/Time fields that contain both the date and time:
Hours: DateDiff("n", [StartDateTime], [EndDateTime]) / 60

This example avoids several traps, e.g.:
- Doesn't use field names that are reserved (such as IN.)

- Copes with shifts that roll past midnight (by storing the date and time in
the same field)

- Doesn't store the calculated duration result in a table field.
(Could be inconsistent with the calculation if you did.)

Things get more complex when you add penalty rates, overtime, non-standard
shifts, public holidays, sick-leave, paid annual leave for part/full timers
(as distinct from casual), tiered pay scales, taxation, commissions,
absenteeism, voluntary salary sacrifice, periodic changes in pay scales,
awards, non-standard work agreements, bonues, danger penalties,
superanuation, and hosts of other issues.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

news:[email protected]...
 
Please Help me about time calculation

Certainly. What kind of calculation would you like to do?

See the VBA help for Date, DateDiff, DateAdd, and DateSerial. Or post a
question with enough details that someone might be able to understand what you
want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top