>I am looking for a function, or maybe some code to help me calculate time only, no dates. I would like to be able to store 2 different times like 8:45 and 9:03 and figure how much time went by, or say the time is 8:55, now add 10 minutes. Would I have to store these figues in a character field?
>
Convert them to datetimes and subtract; the result is in seconds. If you store your times in hh:mm:ss form, you can convert it to a datetime via:
SET DATE TO YMD
SET MARK TO '-'
SET CENTURY ON
tDateTime = EVAL('{^'+dtoc(date())+',00:09:03}')
In order to add durations, the units are in seconds. The difference between datetimes is expressed in seconds. You can extract the time portion as a string using TTOC(
date time expression,2)