User Tools

Site Tools


c:dos.h:setdate
click
to support this page (eg 0,42 € or so) Thanks.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:dos.h:setdate [2013/02/03 13:26] (current)
158.181.88.241 created
Line 1: Line 1:
 +
 +====== setdate ======
 +<code c>
 +struct time setdate( struct time );
 +</code>
 +
 +===== description of setdate =====
 +change the system date\\
 +
 +<code c>
 +#include<stdio.h>
 +#include<conio.h>
 +#include<dos.h>
 +
 +int main(void)
 +{
 +   struct date d;
 +
 +   printf("Please type in new date ( day, month and year ) as int (ddmmyyyy):");
 +   scanf("%d%d%d",&d.da_day,&d.da_mon,&d.da_year);
 +
 +   setdate(&d);
 +
 +   printf("System date is now %d/%d/%d\n",d.da_day,d.da_mon,d.da_year);
 +
 +   getch();
 +   return 0;
 +}
 +</code>
 +
 +==== output of setdate c example ====
 +    Please type in new date ( day, month and year ) as int (ddmmyyyy): 28112012
 +    System date is now 28/12/2012
  
advertising
c/dos.h/setdate.txt · Last modified: 2013/02/03 13:26 by 158.181.88.241

Impressum