Andrew,
>Hi Gavin,
>
>The datetime() approach works well when the resulution required is 1 second or greater. Seconds() returns down to 100ths of a second.
>
>On a different note, remember that you can use strict date literals if your code below read
>
>dtStartTime = {^2001-07-04 11:59:59 PM}
>dtEndTime = {^2001-07-04 12:00:01 AM}
>nTotalSeconds = dtEndTime - dtStartTime
>
>it would work regardless of SET("DATE") - note the caret before the year.
>
>snip<
Except the day for dtEndTime should be '05' rather than '04'. Otherwise you get -86398. <g>
Best,
DD
A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.