Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between two time stamps
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01360224
Message ID:
01360272
Views:
8
>>
>>
>>dDate1 = {11/05/2008}
>>cTime1 = "11:27:59"
>>dDate2 = {11/06/2008}
>>cTime2 = "09:45:21"
>>
>>tDt2 = DTOT(dDate2) + (CTOT(cTime2) - CTOT("00:00") ) 
>>tDt2 = tDt2 - SEC(tdt2)
>>tDt1 = DTOT(dDate1) + (CTOT(cTime1) - CTOT("00:00") )
>>tDt1 = tDt1 - SEC(tdt1)
>>? tDt1, tDt2
>>
>>lnDiffSec = tDt2 - tDt1 + 1
>>
>>? lnDiffSec, INT(lnDiffSec/60 )
>>
>
>Interesting that when I tried to add DTOT(dDate) + CTOT(cTime) I was getting error. But the way you do it, adding DTOT() to a difference of two CTOT() it works. Anyway, this works for me very well. Too bad I can't give you two solution stars in one thread.
>
>Thank you very much!

Don't worry about stars. They should be given to a message with solution/help not to the people who provide them. It makes finding relevant message easier in a search.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform