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

TimeStampToDateTime

Convert a TimeStamp value to a TDateTime value.

Declaration

Source position: datih.inc line 112

function TimeStampToDateTime(

  const TimeStamp: TTimeStamp

):TDateTime;

Description

TimeStampToDateTime converts TimeStamp to a TDateTime format variable. It is the inverse operation of DateTimeToTimeStamp.

Errors

None.

See also

DateTimeToTimeStamp

  

Converts a TDateTime value to a TimeStamp structure.

TimeStampToMSecs

  

Converts a timestamp to a number of milliseconds.

Example

Program Example24;

{ This program demonstrates the TimeStampToDateTime function }

Uses sysutils;

Var TS : TTimeStamp;
    DT : TDateTime;

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;
  DT:=TimeStampToDateTime(TS);
  Writeln ('Together this is : ',DateTimeToStr(DT));
End.

Documentation generated on: Nov 16 2015