help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

TimeStampToDateTime

Convert a TimeStamp value to a TDateTime value.

Declaration

Source position: datih.inc line 98

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505