Important: The information in this document is obsolete and should not be used for new development.
Setting the Current Date and Time
You can modify the date-time information stored in the clock chip by using theSetDateTimefunction or theSetTimeprocedure. The two routines differ in the type of arguments they require. TheSetDateTimefunction requires that the new date-time information be expressed as the number of seconds elapsed since midnight of January 1, 1904 (using a value of typeLongInt). TheSetTimeprocedure requires that the new date-time information be expressed as a date and time (using a value of type DateTimeRec).
- IMPORTANT
- Users can change the current date and time stored in both the system global variable
Timeand in the clock chip by using the General Controls control panel, Date & Time control panel, or the Alarm Clock desk accessory. In general, your application should not directly change the current date-time information. If your application does need to modify the current date-time information, it should instruct the user how to change the date and time.![]()
Subtopics
- SetDateTime
- SetTime