Stored Dates

 BBS: Inland Empire Archive
Date: 04-19-92 (16:50)             Number: 137
From: JEAN CREPEAU                 Refer#: NONE
  To: SCOTT WUNSCH                  Recvd: NO  
Subj: Stored Dates                   Conf: (2) Quik_Bas
In a message to ALL, SCOTT WUNSCH wrote:
SW=>    I am working  on a program  that uses INT  4Eh/4Fh to retrieve file
    names, and  then must  process the  date returned.   I  have tried many
    times to get the two-byte date spread out into day, month and year  but
    it doesn't  seem to  be working  right.   Probably my  last hope is you
    guys/gals...                                    -= Scott \\'unsch =-

        Use the following routine:

DEFINT A-Z
SUB DateTime(DosDate,DosTime,Year,Month,Day,Hour,Min,Sec)
        Year=INT(DosDate/512)+1980
        Month=INT(DosDate/32) AND 15
        Day=DosDate AND 31
        Hour=INT(DosTime/2048)
        Min=INT(DosTime/32) AND 63
        Sec=(DosTime AND 31)*2
END SUB

        Jean
---
 * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
Outer Court
Echo Basic Postings

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