Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format of timestamp field in VCX
Message
From
19/03/2010 09:18:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01455694
Message ID:
01455700
Views:
34
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 
>
>
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform