Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Operations with timeformat variables.
Message
From
25/06/2001 15:02:15
 
 
To
25/06/2001 08:21:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522838
Message ID:
00523171
Views:
18
>Thank Al for your reply.
>I believe that I correctly did not explain myself what I want is subtraction or to add two hours for example:
>12:00:00 p.m. - 9:0:00 is equal to 3 hours.
>I mean the intensity is make a form to calculate the extra time the my employers work, for example:
>Peter Mckarly work the saturday, June 23 from 8:00: a.m. to 12:00:00 p.m.
>In the form the user has to put the Peter id the date (Saturday, June 23) and in a grid the start to (8:00:00 a.m.) Finish to (12:00:00).
>I hope you can help and thanks again.

You are currently using separate grid fields for the date, and the time(s)? I'd suggest using DateTime fields, which include both the date and the time in a single field e.g. 06-25-2001 11:54:00. If you don't care about the seconds portion you can SET SECONDS OFF.

You could initialize the date portion with DATE() to save typing.

The point of my earlier message is that by using DateTime fields/variables, you can get results like
lnHours = (ltDateTime2 - ltDateTime1) / 3600
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform