>Thanks for the reply Cetin. You are right, I do not need the date portion of the result - just the time in hours:minutes format. This means I need to change the result of the subtraction from seconds to TIME format. This will enable me to sum all the periods at the end of the report too. Is there a VFP function that will convert the seconds to TIME, or is there a way to tell VFP to put the reslut of subtracting two datetime fields into a TIME field?
>
The easiest way i can think of would be to first subtract the dates, then add the result to a known date at midnight. The time portion is the time since midnight - as long as the time difference between the two datetimes is one day or less, it works without further refinement.
Example:
dDateTime1 = {^ 1998/09/30 23:59}
dDateTime2 = {^ 1998/10/01 02:00}
dDateTime3 = {^ 1998/01/01 00:00} + ;
(dDateTime2 - dDateTime1)
? HOUR(dDateTime3),MINUTE(dDateTime3),SEC(dDateTime3)
>Mon