Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TimeStamps calculating differently
Message
De
15/08/2007 11:10:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01248245
Message ID:
01248255
Vues:
26
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform