Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

__DATE__ - Output date of compilation (macro)

&pagelevel(4)&pagelevel

Definition

__DATE__

This macro generates the compilation date of a source file as a string in the form:

“dd Mmm yyyy\0”, where


dd

is the day (without leading zero for days < 10)


Mmm

is the name of the month (abbreviated as with asctime)


yyyy

is the year

Note

This macro need not be defined in an include file. Its name is recognized and replaced by the compiler.

Example

#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Program %s was compiled on %s at %s hours\n", argv[0], __DATE__,
__TIME__);
return 0;
}

See also

asctime, __TIME__