Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time
Message
From
22/09/2000 02:56:44
 
 
To
22/09/2000 02:53:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Time
Miscellaneous
Thread ID:
00415848
Message ID:
00419572
Views:
21
Should have been ...

time = TIME(dx)

sorry,



>Yes, as Mike recommends, I also think DateTime() will do the trick.
>
>You could try something like:
>
>dx = DATETIME() && Date & Time
>time = TIME(x) && Time only
>
>.. then you can
>
>dy = dx - DATETIME() && time (date & time) lapsed since above dx
>lapstime = TIME(dy) && time lapsed time (time only)
>
>... or if you want
>
>dz = dx + 600 && dx plus 10 minutes (date & time)
>timeplus10 = TIME(dz) && 10 minutes added to the original time dx (time only)
>
>Something like this may be handy as a class.
>
>HTH
>
>Mal
>
>
>>>I am looking for a function, or maybe some code to help me calculate time only, no dates. I would like to be able to store 2 different times like 8:45 and 9:03 and figure how much time went by, or say the time is 8:55, now add 10 minutes. Would I have to store these figues in a character field?
>>
>>How about storing these values in a numeric field, the number representing the number of seconds since midnight to the time you want. You can write methods to convert them in and out of your times.
>>
>>But I would just use DateTime, and simply ignore the date.
Previous
Reply
Map
View

Click here to load this message in the networking platform