TIP: Click on subject to list as thread! ANSI
echo: delphi
to: STEVE BATSON
from: BRYAN SMITH
date: 1996-08-08 01:25:00
subject: Date Routines

Steve Batson mentioned this to Gary Weinfurther:
 SB> Well, I did find out that it looks like the author may have used the
 SB> packdate and unpackdate routines, but I can't seem to find them in
 SB> Delphi...Do you know what the format for those were in TP 7 or something
 SB> in Delphi that will do the trick?
I believe the layout of the date-time longint in a DOS directory entry (as
used by the TP packtime/unpacktime routines) is as follows ...
                Bit      3        2        1
                No.      1        3        5        7      0
Most Significant Bit ->  YYYYYYYM MMMDDDDD hhhhhmmm mmmxxxxx  <- Least S.B.
Y = year - 1980, 7 bits (Y is in the range 0-119)
M = month, 4 bits
D = day, 5 bits
h = hour, 5 bits
m = min, 6 bits
x = seconds/2, 5 bits
You can take such a longint apart with ands and bit-shifts, or put it back
together with bit-shifts and ors.  If you only care about the date, you need
bother only with the high word.
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.