QUOTE(tootypegs @ 30 Aug, 2008 - 05:23 PM)

thanks for quick reply. It is only for display purposes really, i just want to be able to get the mod, created and accessed time and dates for each entry and display them, not do anything special with them really.
I have used the SYSTEMTIME structure in the past but it doesnt seem to be working on the particular bytes I have obtained from the directory structure. You mention that I wouldnt even need to do this as I am only doing it for display purposes , but how would you go about the conversion without the SYSTEMTIME structure?
thanks
The page I linked to tells you how to extract the date and time from the 32-bit field (which is two 16-bit fields).
QUOTE
* Bits 0-4: Day
* Bits 5-8: Month
* Bits 9-15: Year
QUOTE
* Bits 0-4: Seconds
* Bits 5-10: Minutes
* Bits 11-15: Hours
I'm not entirely certain of the order. You'll have to do some testing to find out.
cpp
// Assume that this is what I mean by WORD:
typedef unsigned short WORD;
WORD date = ...;
WORD time = ...;
int day = date & 0x1F;
int month = (date >> 5) & 0x0F;
int year = (date >> 9) + 1980;
// The resolution of the timestamp is 2 seconds, so the seconds field has to be
// multiplied by 2.
int seconds = (time & 0x1F) << 1;
int minutes = (time >> 5) & 0x3F;
int hours = (time >> 11);
I hope this should make the rest of the needed work obvious.