home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progc
/
c_all592.arj
/
TI718.ASC
< prev
next >
Wrap
Text File
|
1992-02-25
|
964b
|
67 lines
PRODUCT : Borland C++ NUMBER : 718
VERSION : 2.0
OS : DOS
DATE : February 25, 1992 PAGE : 1/1
TITLE : Printing the Date and Time of a File
/*************************************************************
This program will print the date and time of a file.
*************************************************************/
#include <dir.h>
#include <io.h>
union FF
{
unsigned i[2];
struct ftime f;
} u;
main()
{
struct ffblk ff;
findfirst("tc.exe", &ff, 0);
u.i[0]= ff.ff_ftime;
u.i[1]= ff.ff_fdate;
printf("date= %d/%d/%d time= %d:%d:%d\n",
u.f.ft_month, u.f.ft_day, u.f.ft_year+80,
u.f.ft_hour, u.f.ft_min, u.f.ft_tsec);
return 0;
}