subtract hours

W

Wez.k

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
 
D

Duane Hookom

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.
 
W

Wez.k

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.
 
D

Duane Hookom

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.
 
Top