[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

DateTimeToTimeStamp

Converts a TDateTime value to a TimeStamp structure.

Declaration

Source position: datih.inc line 111

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

DateTimeToFileDate

  

Convert a TDateTime value to a file age (integer)

SystemTimeToDateTime

  

Convert a system time to a TDateTime value.

DateTimeToSystemTime

  

Converts a TDateTime value to a systemtime structure.

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.

Documentation generated on: Mar 17 2017