Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format of timestamp field in VCX
Message
 
 
À
19/03/2010 09:08:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01455694
Message ID:
01455697
Vues:
86
This message has been marked as the solution to the initial question of the thread.
>Anybody know what the format is of the TimeStamp field in a VCX or SCX?

Check Re: Decode VCX timestamp? Thread #1098675 Message #1098679

MSDN Reference

http://blogs.msdn.com/calvin_hsia/archive/2005/01/21/358339.aspx
PROCEDURE DecodeTimeStamp(nTimestamp as Number) as Datetime && see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/filetimetodosdatetime.asp 

      nDate=BITRSHIFT(nTimestamp,16)

      nTime=BITAND(nTimestamp,2^16-1)

      

      nYear=BITAND(BITRSHIFT(nDate,9),2^8-1)+1980

      nMonth=BITAND(BITRSHIFT(nDate,5),2^4-1)

      nDay=BITAND(nDate,2^5-1)

 

      nHr=BITAND(BITRSHIFT(nTime,11),2^5-1)

      nMin=BITAND(BITRSHIFT(nTime,5),2^6-1)

      nSec=BITAND(nTime,2^5-1)

 

      RETURN DATETIME(nYear,nMonth,nDay,nHr,nMin,nSec)

RETURN 
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform