Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Converting Dirctory() dates to standard dates 2000-09-19 -- Udo Cizelj This is from CPD DOS Shell Example
Good old CPD :)
MINS# = BAND(TBL:TIME,07E0H) !GET BITS 5 THRU 10 (MINS)
MINS# = BSHIFT(MINS#,-5) !SHIFT RIGHT 5 BITS
HOURS# = BAND(TBL:TIME,63488) !GETS BITS 11 THRU 15 (HOURS)
HOURS# = BSHIFT(HOURS#,-11) !SHIFT RIGHT 11 BITS
FHOURS = HOURS# !DISPLAY HOURS
FMINS = MINS# !DISPLAY MINUTES
MONTH# = BAND(TBL:DATE,01E0H) !GET BITS 5 THRU 8 (MONTH)
MONTH# = BSHIFT(MONTH#,-5) !SHIFT RIGHT 5 BITS
DAY# = BAND(TBL:DATE,001FH) !GET BITS 0 THRU 4 (DAY)
YEAR# = BAND(TBL:DATE,0FE00H) !GET BITS 9 THRU 15 (YEAR)
YEAR# = BSHIFT(YEAR#,-9) !SHIFT RIGHT 9 BITS
YEAR# += 80 !ADD YEAR TO BASE OF 1980
-------------------------------------
TBL:TIME and TBL:DATE are DOS time and dat
Today is November 21, 2024, 7:16 am This article has been viewed 35306 times.
|
|