Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time Calculation
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00142443
Message ID:
00142946
Views:
33
>Thanks for the reply Erik. It's too bad that VFP does not have a time data type - it would have made things a little easier. If I convert the seconds to a time string and save the results in my database, I would be able to display the time string in the report detail band. However, I wouldn't be able to add up the fields to display totals in the summary band of the report. I guess this would work better if I can apply the conversion function on the report's field instead of the database field, but I don't know how to call a user's function from a report's field box. Any ideas?
>
>Mon

Mon,

There is no time without a date. For example what is the number of hours between 8:00 am and 7:00am? Without knowing the days involved there is no way to tell, is it -1 hour, 23 hours, or 47 hours?

For your problem use the seconds, store them in a field in teh dbf and use a udf to convert them to hours and minutes. You can total the seconds and use the same udf to convert to hours and mintues. IOW, convert to display and stored the actual count of seconds.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform