Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate time from 2 "short time" fields

Status
Not open for further replies.
Dec 21, 2000
6
US
Let me say first - thanks in advance to anyone who can help me.

I would like to calculate the time between two short time fields. Ex: mtime1in (short time in military time with the imput mask set to 00:00) the out time field of mtime1out set exactly the same as mtime1in. In my report I used an unbound box to do a control source =[mtime1out]- [mtime1in]. The stuff that comes up on the report is far out decimals. ie - if the timein is 15:45 and timeout is 17:15, I get .00625 not the 1.50 I was looking for. I've set the time on my computer to the short time (military time) hoping that would help the calculations, but it didn't! Is there a math factor that I've not allowed for (or never knew about)? I'm sure there is a simple something that I've missed completely, so I'll wait patiently for someone to help this poor misguided individual finish this report.
 
Format(#17:15# - #15:45#, "Short Time")
returns 01:30 (rember that 1/2 Hour ~ 30 Minutes)

Rember that you are worknig with DATE/TIME variables. When you do a calculation, the result is in some default 'units' (in this instance the fractional part of a full day). If you want it displayed in specific units, you need to 'fornat'it appropiatly.


MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top