DateTimeToTimeStamp

Converts a TDateTime value to a TimeStamp structure.

Declaration

Source position: datih.inc line 113

  function DateTimeToTimeStamp(DateTime: TDateTime) : TTimeStamp;

Description

DateTimeToSystemTime converts a date/time pair in DateTime, with TDateTime format to a TTimeStamp format.

Errors

None.

See also

Name Description
DateTimeToFileDate Convert a TDateTime value to a file age (integer)
DateTimeToSystemTime Converts a TDateTime value to a systemtime structure.
SystemTimeToDateTime Convert a system time to a TDateTime value.

Example

Program Example6;
{ This program demonstrates the DateTimeToTimeStamp function }
Uses sysutils;
Var TS : TTimeStamp;
Begin
  TS:=DateTimeToTimeStamp (Now);
  With TS do
    begin
    Writeln ('Now is ',time,' millisecond past midnight');
    Writeln ('Today is ' ,Date,' days past 1/1/0001');
    end;
End.