Syntax for compile date & time in the code

Trying to help members I've seen a compiler command that stamps the code with date and time. Something like __DD__TT..... Searching for it now.
Any member having a better memory than I?
Trying to identify old code and keep them apart is the reason.

Perhaps you mean __TIMESTAMP__?

__DATE__ __TIME__

Two underscores before and after.

something like this may be?

const char * compiledOn = "compiled: " __DATE__ "\t" __TIME__;

void setup() {
  Serial.begin(115200);
  Serial.println(compiledOn);
}

void loop() {}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.