subtract hours

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
Could anyone tell me a simple way to subtract two times to give the
difference, i.e. subtract 22:40 from 26:00 to get 03:20.
The values are held in text boxes on a report.

Thanks
 
Do you have date/time fields or are you attempting to do this with text
fields. Since you stated "26:00" I should have suspected text.
 
Text fields - is that the problem?

Duane Hookom said:
Do you have date/time fields or are you attempting to do this with text
fields. Since you stated "26:00" I should have suspected text.
 
You would need to convert the text to a date. If your values were all less
than "24:00" then you could use CDate() or TimeValue(). Values greater than
23:59:59 would require a custom function or fancy expression.
 
Back
Top