GetTime
You can use theGetTimeprocedure to obtain the current date-time information, expressed as a date and time.
PROCEDURE GetTime (VAR d: DateTimeRec);
d- On return, the fields of the date-time record contain the current date and time.
DESCRIPTION
TheGetTimeprocedure returns in thedparameter the current date and time. TheGetTimeprocedure first calls theGetDateTimeprocedure to obtain the number of seconds elapsed since midnight, January 1, 1904. It then calls theSecondsToDateprocedure to convert the number of seconds (returned by theGetDateTimeprocedure) into a date and time.As an alternative to using the
GetTimeprocedure, you can pass the value of the global variableTimeto theSecondsToDateprocedure; aSecondsToDate(Time) procedure call is identical to aGetTime(d)procedure call.SEE ALSO
For more information about theSecondsToDateprocedure, see page 4-38. TheGetDateTimeprocedure is described on page 4-35. For sample code that uses theGetTimeprocedure to get the current date and time, see Listing 4-2 on page 4-10. The date-time record is described in detail beginning on page 4-23.