Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports - Best way to compute delta times?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00459559
Message ID:
00459565
Views:
20
>I have a VFP table with a start time and an end time. I report the start and end times in a Crystal Report detail line. What is the best way to compute the time interval (delta time) detail line, the difference between the start time and end time using Crystal Reports to do the computation?
>
>My start time is defined as Character 8 for example 11:11:11
>My end time is defined as Character 8 for example 12:12:12
>This time interval would be 01:01:01.
>
>Can I compute this with a one line formula in Crystal Reports? If so, what would it look like?
>
>I know how to do it with many, many lines, but there must be a neater way to accomplish the same thing. Thanks so much.

In VFP, (don't know about Crystal):

?TTOC(DTOT(DATE())+(CTOT(DTOC(DATE())+" "+cEndTime)-CTOT(DTOC(DATE())+" "+cStartTime)),2)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform