Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Calculation
Message
From
30/09/1998 12:26:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00142443
Message ID:
00142456
Views:
27
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform