Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TimeStamps calculating differently
Message
From
15/08/2007 11:10:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01248245
Message ID:
01248255
Views:
25
>Hi Cetin
>
>>It's a known issue with datetime. It is due to how datetime is stored (a silly way IMHO but not VFP's fault):
>>
>>lnTotalSecs = round(EVALUATE(THIS.cToDateTimeField) - EVALUATE(THIS.cFromDateTimeField),0)
>
>Thanks a million, this was driving me whacky.

Yeah did me too years ago too. Whenever you need something like that or search on a column with datatime datatype remember that. ie:

Never search like this:
select * from myTable where myDatetime = m.ltDatetime
But like this:
select * from myTable where ttoc(myDatetime,1) == ttoc(m.ltDatetime,1)
or a similar expression.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform