Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Math with dates/times ----- Novice
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00088775
Message ID:
00088897
Views:
32
>>>>Is there a convenient way to do arithmetic with dates and times in
>>>>VFP? To be specific, I am continually updating data in a grid and
>>>>would like to notify the user of the time of the *next* update (say,
>>>>15 minutes after the previous one).
>>
>>Now Ed! He wants to do math and he did say he is a novice.
>>
>>Paul try this:
>>
>>[The next update will occur at ]+subst(time(),1,3)+alltrim(str(val(subst(time(),4,2))+15))
>>
>>To get this:
>>
>>The next update will occur at 16:50
>>
>>DJ :o)
>
>Donald,
>That won't work because at 16:50, if you use the above command, the next update will occur at 16:05. I think the solution would be a bit more complex than that.

I agree (and was surprised to discover this). I don't understand the idea
behind coming up with the DateTime data type since it really doesn't convey
any advantages over having Date/Time as a character data type. You have this special data type that does nothing (really). I thought maybe I was missing
something or perhaps that there was a commonly known procedure for performing
calculations on time.
Paul M.
MCSE/MCSA/MCT/MCP+I, A+, Network+, I-Net+
Nil carborundum illegitimi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform