Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filer.dll and datetime properties
Message
De
14/09/2016 11:31:19
 
 
À
14/09/2016 10:55:15
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01640743
Message ID:
01640800
Vues:
58
>>>Hi all,
>>>
>>>I thought I knew how to do this but can not find the GetTime() function. MSDN article on the Filer.DLL refers to a GetTime function in the Filer.SCX, but there is none. Does anyone know how to convert the datetime numeric properties provided by the Filer.FileUtil object? I know I can use the FileSystemObject to obtain the information in datetime format, but extra step adds delays to processing large sets of files.
>>>
>>>Does the GetTime() exist? and where can I find it.
>>
>>
>>CAST(File.DateTime + {^1899-12-30} AS T)
>>
>
>Thanks, I will give it a try soon. But the decimal portion does not appear to be a fractional part of a day.

Since a day has 86400 seconds, the fractional part corresponds to n*(1/86400). For instance, {^1899-12-30 00:00:01} is 0.000011574074074 (approximately).

Reverting:
LOCAL Now AS Datetime
LOCAL NumericDate AS Number

SET DECIMALS TO 9

m.Now = DATETIME()
m.NumericDate = (TTOD(m.Now) - {^1899-12-30}) + (m.Now - DTOT(TTOD(m.Now)))/86400

? m.Now,m.NumericDate,CAST(m.NumericDate + {^1899-12-30} AS T)
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform