How can I insert compilation timestamp information into an executable I build with Visual C++ 2005? I want to be able to output something like this when I execute the progra
Though not your exact format, DATE will be of the format Mmm dd yyyy, while TIME will be of the format hh:mm:ss. You can create a string like this and use it in whatever print routine makes sense for you:
const char *buildString = "This build XXXX was compiled at " __DATE__ ", " __TIME__ ".";
(Note on another answer: TIMESTAMP only spits out the modification date/time of the source file, not the build date/time.)