BBS: Inland Empire Archive Date: 04-18-92 (19:09) Number: 97 From: BOB PERKINS Refer#: NONE To: SCOTT WUNSCH Recvd: NO Subj: Re: Stored dates Conf: (2) Quik_Bas
SW> I am working on a program that uses INT 4Eh/4Fh to retrieve file SW> names, and then must process the date returned. I have tried many SW> times to get the two-byte date spread out into day, month and year SW> but it doesn't seem to be working right. Probably my last hope is SW> you guys/gals... FUNCTION ascdate$ (filedate%) year$ = LTRIM$(STR$(((filedate% AND 65024) \ 512) + 1980)) month$ = LTRIM$(STR$((filedate% AND 480) \ 32)) day$ = LTRIM$(STR$(filedate% AND 31)) IF LEN(month$) = 1 THEN month$ = "0" + month$ IF LEN(day$) = 1 THEN day$ = "0" + day$ ascdate$ = month$ + "-" + day$ + "-" + year$ END FUNCTION --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET