Keil Logo

C51: __DATE__ and __TIME__ Macros


Information in this article applies to:

  • C51 All Versions

QUESTION

Is it possible to insert the date and time into my program?

ANSWER

Yes.

Use the __DATE__ and __TIME__ predefined macros. For example:

char code my_date[] = "Compile Date = " __DATE__;
char code my_time[] = "Compile Time = " __TIME__;

MORE INFORMATION

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.