0

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:

6
Contributors
6
Replies
7
Views
10 Years
Discussion Span
Last Post by dwks
0

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?

0

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.

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.