From Cliff Rhodes · 1996-04-01 15:22 · #73525 in EMULATE
In reply to ff_fdate question by Kyle Hellewell
--> Kyle Hellewell wrote to All <-- KH>I'm trying to get file dates out of ffblk.ff_fdate using KH>findfirst and findnext, but the numbers that it gives me KH>are four digit numbers that I can't seem to decipher using KH>the information that they give me in help. Can anyone tell KH>me what I have to do to turn this into a normal date code? KH>FYI, it says in help that these codes that it's giving me KH>are 16-bit, and are stored the same way that dos stores its KH>file dates (How can a 4 digit # be 16 bits?) int day, month, year; day = ffblk.ff_fdate & 0x001f; // Day is lowest 5 bits month = ((ffblk.ff_fdate >> 5) & 0x000f); // Month is middle 4 bits year = (ffblk.ff_fdate >> 9) + 1980; // Upper bits give year since 1980 ___ * CMPQwk 1.4 #1692 * "The meaning of life is that it stops." - Franz Kafka --- Maximus/2 3.01 * Origin: COMM Port OS/2 (713) 980-9671 (1:106/2000)