forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading DOS compressed date/time

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    forums.silverfrost.com Forum Index -> KBase
View previous topic :: View next topic  
Author Message
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 146
Location: Manchester

PostPosted: Tue Sep 07, 2004 9:56 pm    Post subject: Reading DOS compressed date/time Reply with quote

Summary
Certain ClearWin+ functions, including FILES@, return file date/time information as compressed DOS format in integer(kind=2).

Solution
The date can be extracted into day/month/year components from such an integer using:

Code:
integer date_day, date_month, date_year
date_day = ibits(date(1), 0, 5)
date_month = ibits(date(1), 5, 4)
date_year = 1980 + ibits(date(1), 9, 7)


where date(1) is the integer(kind=2) containing the compressed file date information.

The time can be extracted into hour/minute/second components using:

Code:
integer time_second, time_minute, time_hour
time_second = ibits(time(1), 0, 5)*2
time_minute = ibits(time(1), 5, 6)
time_hour = ibits(time(1), 11, 5)


where time(1) is the integer(kind=2) containing the compressed file time information.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    forums.silverfrost.com Forum Index -> KBase All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group