GetTime
You can use theGetTime
procedure 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
TheGetTime
procedure returns in thed
parameter the current date and time. TheGetTime
procedure first calls theGetDateTime
procedure to obtain the number of seconds elapsed since midnight, January 1, 1904. It then calls theSecondsToDate
procedure to convert the number of seconds (returned by theGetDateTime
procedure) into a date and time.As an alternative to using the
GetTime
procedure, you can pass the value of the global variableTime
to theSecondsToDate
procedure; aSecondsToDate(Time
) procedure call is identical to aGetTime(d)
procedure call.SEE ALSO
For more information about theSecondsToDate
procedure, see page 4-38. TheGetDateTime
procedure is described on page 4-35. For sample code that uses theGetTime
procedure 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.