#include <stdio.h>
#include <dos.h>

void main()
  {
    struct dosdate_t date;
    struct dostime_t time;

    /* Get and display the current date and time */
    _dos_getdate( &date );
    _dos_gettime( &time );
    printf( "The date (MM-DD-YYYY) is: %d-%d-%d\n",
		  date.month, date.day, date.year );
    printf( "The time (HH:MM:SS) is: %.2d:%.2d:%.2d\n",
		  time.hour, time.minute, time.second );
  }
//************ Sample program output ************
//The date (MM-DD-YYYY) is: 12-25-1989
//The time (HH:MM:SS) is: 14:23:57
