/*
** Program GET_DATE.C
**
** Shows how to fetch date and time off the system.
**
** struct date and struct time are defined in dos.h
**
** struct date
** {
** int da_year;
** char da_day;
** char da_mon;
** };
**
** struct time
** {
** unsigned char ti_min;
** unsigned char ti_hours;
** unsigned char ti_hund;
** unsigned char ti_sec;
** };
**
/* Peter H. Anderson, MSU, 24 Oct 96
/**************/
#include <stdio.h>
#include <dos.h> /* for getdate and gettime */
#include <conio.h> /* for clrscr */
struct date d;
struct time t;
void main (void)
{
struct date d;
struct time t;
clrscr();
getdate(&d);
gettime(&t);
printf ("%.2d/%.2d/%.2d\t%.2d:%.2d:%.2d\n",
d.da_mon, d.da_day, d.da_year,
t.ti_hour, t.ti_min, t.ti_sec);
}