Getting time and date with preprocessor

In my application I want to display the build time and date in about box.
That is the time/date the EXE was built.
Therefore I need the actual time and date at compile time.

Anybody know an easy way to get this time and date?
I don't want to take the file date at run-time.

A preprocessor macro would be fine.
Any ideas ?

LVL 9
PacmanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
GloriousRainConnect With a Mentor Commented:
To help you perform such processing, the C preprocessor assigns the constants __DATE__ and __TIME__ to the current date and time.
Ex:
printf("Beta testing: Last compiled %s %s", __DATE__, __TIME__);
0
 
PacmanAuthor Commented:
Compiler is MS VC6.0 ...
doesn't have to be ANSI solution
0
 
PacmanAuthor Commented:
That's it!
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.