` Converting Dirctory() dates to standard dates (Udo Cizelj ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

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, 3:43 am
This article has been viewed 35305 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: