Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't interpret file creation date and time.

Status
Not open for further replies.

xlav

Technical User
Oct 23, 2003
223
JM
I used functions findfirst() and findnext() ((from dir.h))to access a directory. The structure members of struct fblock ie., fblock.ff_name,fblock.ff_size, etc., were used to display names, sizes, creation dates and creation times of the directories files. Dates such as 12087, 12068, 11903 and times such as 41166, 42089, 34399 were displayed. Appreciate your help in interpreting this information.
Thanks.
 
DOS date and time information is highly compressed - if you don't know how to manipulate bits, then you're pretty stuck

The 16 bit time value looks something like this
0hhhhhmmmmmsssss
where the hours, minutes and seconds are groups of bits within the 16 bit integer

You need to read the manual/header to find out what the actual bit positions are


--
 
DOS Time Bits :
0–4 :- Second divided by 2
5–10 :- Minute (0–59)
11–15 :- Hour (0–23 on a 24-hour clock)

Alternatively the function 'DosDateTimeToFileTime' will get you a windows FileTime.
'FileTimeToSystemTime' will then you 'normal' time formats.
 
Thanks for your help.

-x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top