BBS: Inland Empire Archive Date: 11-04-92 (08:44) Number: 372 From: JON LEGER Refer#: NONE To: ROBERT CHURCH Recvd: NO Subj: Re: File's date and time Conf: (2) Quik_Bas
RC> How do I get the date and time from the Dos DTA? I've got the DTA structu RC> and the FindFirst/FindNext routines, but how do I convert the bit-mapped t RC> and date portions of the DTA structure to integers? Thanks RC> RC> [-=ROB=-] Use the GetFileData (dta, File as FileDataType) sub. Example: TYPE FileDataType FileName as string * 12 FileYear as integer FileMonth as integer FileDay as integer FileHour as integer FileSecond as integer FileAttrib as integer FileSize as integer END TYPE 'Ok. You wanna find the date and time for MYFILE.TXT 'This is what you do. 'First set MyFile as FileDataType DIM MyFile as FileDataType 'Second get the file's data FindFirstFile "MYFILE.TXT",d$,r% 'Ok, now that that is done, get the file's information GetFileData d$,MyFile 'That would get you all of 'MYFILE.TXT's information. Now all you have to 'do is print that information. COLOR 7: CLS PRINT "File Name: "+MyFile.FileName PRINT "File Date: "+MyFile.FileYear+"/"+MyFile.FileMonth+"/"+MyFile.FileDa y PRINT "File Time: "+MyFile.FileHour+":"+MyFile.FileMinute+":"+MyFile.FileS econd END ----- Hope that helps. Jon ....if not I'm sure some of those QB genious-type people could help you out better. :) --- Renegade v7-09 Beta * Origin: TELESiS BBS 409.721.9414 NEDERLAND, TX (1:3811/118)
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