Hi ppl!

can anyone tell me how to capture system date and o/p it later in a prog??

what function do i use??

thanks in advance! appreciate any help rendered. :cheesy:

Hi ppl!

can anyone tell me how to capture system date and o/p it later in a prog??

what function do i use??

thanks in advance! appreciate any help rendered. :cheesy:

Time library?

for dates, there is an inbuilt structure in dos.h

to get help in the cpp just get help on date

the date structure has just 3 items,day month and year.
there are in built functions to get current date
the following code will fill the structure item d1 with the current system date.

date d1;
getdate(&d1);
cout<<d1.da_year<<d1.da_day<<d1.da_mon;//display date

to know more about each data item in struct date just get help from your cpp program.

for dates, there is an inbuilt structure in dos.h

to get help in the cpp just get help on date

the date structure has just 3 items,day month and year.
there are in built functions to get current date
the following code will fill the structure item d1 with the current system date.

date d1;
getdate(&d1);
cout<<d1.da_year<<d1.da_day<<d1.da_mon;//display date

to know more about each data item in struct date just get help from your cpp program.

Only very ancient compilers have dos.h. The ANSI-standard functions in <time.h> are a much better bet.

This article has been dead for over six months. Start a new discussion instead.