User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:dos.h:setdate

setdate

description of setdate

change the system date

#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;
}

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

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/dos.h/setdate.txt · Last modified: 2024/02/16 01:06 (external edit)

Impressum Datenschutz