Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TimeStamps calculating differently
Message
 
 
À
16/08/2007 16:32:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01248245
Message ID:
01248784
Vues:
26
>>>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
>>
>>When > < Between() is it also better to use ttoc()? Like ttoc(myDatetime,1) >= ttoc(m.ltDatetime,1)
>>
>>Kamil
>
>Yes. Otherwise some values would be out of range while they should be in range. Internally it may look like:
>
>123.320 between 123.325 and 125.000
>
>figures are imaginery just to mean you may not be sure how 2 datetime values visually looking to be the same is stored and they may be different.
>
>Cetin

Cetin, you wrote "It is due to how datetime is stored (a silly way IMHO but not VFP's fault)"
Can you point to some article where datetime storage is described?
Thank you.
A moment of silence is our cosmic reset button.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform