>I have two datetime fields, and I need to find the time period between them. When I subtract one from the other I get the results in seconds. Is there a function to put this back in DateTime format? Since I need to show the results in the detail band of a report, I am hoping for a quick VFP function. I am also showing the total of all the time periods at the end of the report. Thanks.
>
>Mon
Back in Datetime format (in appearance like 1/1/0002 10:20:54) ? Lowest supported year is 100 so it would be a problem. You could add those seconds to a predetermined datetime ie: {1/1/1900 00:00:00} and bake with functions ttoc(), val(), stuff() etc. Just quick explanation of what I mean :
cSample=ttoc({1/1/1900 00:00:00}+(datetime()-{1/1/1997 12:25}),1)
? cSample
? val(cSample)-19000000000000
Cetin