[Dev-C++] RE:To get the current time and date.....
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <Rub...@al...> - 2005-04-07 18:34:49
|
Hello LETCHUMANAN,
Please, try this program. I gues is what you are looking for.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
main(){
time=5Ft *t;
struct tm *fecha;
=20
time(t);
fecha=3Dlocaltime(t);
=20
printf("\n\nDate (mm/dd/yyyy): %d/%d/%4d\n\nTime : %dh %dm %ds\n\n",\
fecha->tm=5Fmon+1,fecha->tm=5Fmday,fecha->tm=5Fyear+1900,fecha->tm=5Fhour,\
fecha->tm=5Fmin,fecha->tm=5Fsec);
system("pause");
return;
}
Ruben Savia
Ingeniero Electr=F3nico
Datacom Services
eBD - eBusiness Division
Alcatel de Argentina S.A.
e-mail : rub...@al...=20
Phone: 5411 4349 - 1111 ext.1001
Fax: 5411 4349 - 1199
Alcanet : 2930-1001
Web site: www.ind.alcatel.com=20
|