Sign in Join
FPDoc Onlineexperiment

SystemTimeToDateTime function

In unit sysutils

Convert a system time to a TDateTime value.

Declaration

pascal
function SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime

Description

SystemTimeToDateTime converts a TSystemTime record to a TDateTime style date/time indication.

Errors

None.

See also

Example: ex22

pascal
Program Example22;

{ This program demonstrates the SystemTimeToDateTime function }

Uses sysutils;

Var ST : TSystemTime;

Begin
  DateTimeToSystemTime(Now,ST);
  With St do
    begin
    Writeln ('Today is    ',year,'/',month,'/',Day);
    Writeln ('The time is ',Hour,':',minute,':',Second,'.',MilliSecond);
    end;
  Writeln ('Converted : ',DateTimeToStr(SystemTimeToDateTime(ST)));
End.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.