Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format of timestamp field in VCX
Message
 
 
À
19/03/2010 09:18:39
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:
01455701
Vues:
34
I assumed there should have been this question asked before, but to be honest I started my search from fox.wikis.com

I think I will need to update topic where I found a reference to timestamp to a reference to Calvin's blog.

>Thank you ... guess I didn't look back far enough.
>
>
>
>>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform