getdate()
Gets or sets DOS system date
Declaration:
void getdate(struct date *datep);
Remarks:
getdate fills in the date structure *datep with the system's current date.
Return Value:
getdate: None
On success, returns 0
Otherwise, returns a non-zero value and
sets errno to EINVAL (Invalid date)
Program
#include <stdio.h> int main(void) { struct date d; getdate(&d); printf("The current year is: %d\n", d.da_year); printf("The current day is: %d\n", d.da_day); printf("The current month is: %d\n", d.da_mon); return 0; } |
0 comments:
Post a Comment