Re: File's date and time

 BBS: Inland Empire Archive
Date: 11-06-92 (09:28)             Number: 341
From: REUVEN LAX                   Refer#: NONE
  To: KENNY BINGHAM                 Recvd: NO  
Subj: Re: File's date and time       Conf: (2) Quik_Bas
 -=> Quoting Kenny Bingham to Robert Church <=-

 KB> Howdy, Robert!

 KB> While screaming at All <02 Nov 92 20:23> Robert Church raved:

 RC> How do I get the date and time from the Dos DTA?  I've got the
 RC> DTA structure and the FindFirst/FindNext routines, but how do I
 RC> convert the bit-mapped time and date portions of the DTA
 RC> structure to integers?  Thanks

 KB> I'm not sure exactly what a "DTA" is.... I only have an XT type of
 KB> machine. But if you want to read the time and date in from a file, why
 KB> not try something like this: DOS:
 time>test.txt
 date>test.txt
  No That's not what he was talking about Robert try this.
  Seconds = Time  and &H001F            'bit's 0-4 in increments of 2
  Minutes = Time  and &h07E0            'bit's 5-10
  Hours   = Time  and &HF800            'bits 11-15
  for Date
  Year    = (Date and &hFE00)+1980      'Bits 9-15 + 1980
  Month   = Date and &H01E0             'Bit's 5-8
  Day     = Date and &H001F             'Bit's 0-4.

--- Blue Wave/RA v2.10 [NR]
 * Origin: Hard Disc Cafe / Houston Texas / (713) 589-2690 / (1:106/30.0)
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