CDATE (System Variable)

Stores the current date and time in coded decimal format.

(Read-only)
Type:Real
Saved in:Not-saved
Initial value:Varies

The date and time displays in a decimal format starting with the year, month, and day. After the decimal point, CDATE displays the time using a 24-hour clock. For example, the ninth day of February in the year 2006 at 3:05 pm displays as 20060209.15050000.

Note: Starting with AutoCAD 2017-based products, the current system date and time stored in the CDATE system variable is accurate to the current second; whereas in previous releases the current system time also included milliseconds. If you are using the CDATE system variable to track changes between a start and end time, be warned that you will no longer see a change in time until one second has elapsed even though 0 to 999 milliseconds might have passed. When needing to calculate differences in time smaller than one second, consider using the value returned by the MILLISECS system variable.