• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

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 ?

0
Pacman
Asked:
Pacman
  • 2
1 Solution
 
PacmanAuthor Commented:
Compiler is MS VC6.0 ...
doesn't have to be ANSI solution
0
 
GloriousRainCommented:
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:
That's it!
Thank you
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now