I am using Access 2003 SP3, and cannot get it to hold the "0" if it is an
a.m. time (using date/time data type), i.e. 07:05 comes out as 7:05 or 07:05
AM. Storing data as text (not date/time) with mask "00:00;;_" works, but
time doesn't calculate properly.
This is what I am trying to do: Coverage Times: 07:30 - 09:05 = 1 hr. 35
min. OR
14:50 - 15:40 = 50 minutes. I use a field for start time, end time and an
expression in the query to calculate.
Thank you for your assistance!!!
Use the function at
http://www.accessmvp.com/djsteele/Diff2Dates.html
to display the difference in two times in hours and minutes.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
> Use the format of
> hh:nn
> to display military time to the minute.
> hh:nn:ss
> to display military time to the second.
The format property will not display a leading zero on the hour unless
your Windows regional settings are configured to do so. Oddly you can
use format to supress the leading zero on hours when the regional
setting shows it by default, but you cannot use the format property to
display the leading zero if the regional setting is set to not show it.
The Format() function can show a leading zero regardless of the
regional setting though.
Time_Span: DateDiff("n",[start time], [end time])\60 & "Hours : " &
DateDiff("n",[start time], [end time]) Mod 60 & " Minutes"
--
Build a little, test a little.
--
Build a little, test a little.