PRODUCT : Borland C++ NUMBER : 718
VERSION : 2.0
OS : DOS
DATE : October 19, 1993 PAGE : 1/1
TITLE : Printing the Date and Time of a File
/*************************************************************
This program will print the date and time of a file.
*************************************************************/
#include
#include
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;
}
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.