Time

  • Thread starter Thread starter Heather
  • Start date Start date
H

Heather

Could anyone please advise the best format to use in a
field when entering total hours and seconds - be
calculated. Should an Input Mask be used?

Also When entering time start, time finished what forumla
can be used to calculate the correct hours and mins in the
total field.


Many thanks.
 
Could anyone please advise the best format to use in a
field when entering total hours and seconds - be
calculated. Should an Input Mask be used?

Also When entering time start, time finished what forumla
can be used to calculate the correct hours and mins in the
total field.

These are two separate issues. If the start time and finished time are
clock times, I'd suggest storing ONLY those fields, not the duration;
a Date/Time field is a specific instant in time, and is not ideally
suited for durations. In any case, if you have the start and end time
you can calculate the time between "on the fly"; therefore it SHOULD
be calculated on the fly, not stored in the table.

You can calculate the number of minutes (or seconds) between two
Date/Time fields using the DateDiff function. To get minutes, for
instance, use

Duration: DateDiff("n", [Start], [End])

where "n" stands for miNutes ("m" is Months).

To display (say) 603 minutes as 10:03, use an expression like

DateDiff("n", [Start], [End]) \ 60 & Format(DateDiff("n", [Start],
[End]) MOD 60, ":00")
 
Back
Top