Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How convert ADSI LargeInteger to Datatime type?
Message
 
À
31/05/2002 15:14:24
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00663356
Message ID:
00663637
Vues:
16
>George,
>
> I tested you code and works very well with files.
>But my problem is that I have Low and High parts separately,
>I don`t have a FILETIME value, just a INTEGER8 value.
> Can you show me some example?
>
>Thank you,
>
>
Paulo,

If you have just the value as a single number, you can use the conversion routines to convert it to a string with a simple call to IntegerToString. Assuming you have the value and have already created the integer conversion object (as oConvert as shown below), then it's simply
lcfiletime = oConvert.IntegerToString(nADSIval, 8)
The 8 as the parameter tells the function to make the returned string 8 bytes long. The format of the date/time value is exactly the same as a Win32 FILETIME structure.

Addendum: Like filetimes, ADSI stores times as GMT times, so you need to do the call to FileTimeToLocalFileTime() as mentioned earlier.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform