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



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

DateTimeToStr

Converts a TDateTime value to a string using a predefined format.

Declaration

Source position: datih.inc line 119

function DateTimeToStr(

  DateTime: TDateTime

):String;

Description

DateTimeToStr returns a string representation of DateTime using the formatting specified in ShortDateTimeFormat. It corresponds to a call to FormatDateTime('c',DateTime) (see formatchars).

Errors

None.

See also

FormatDateTime

  

Return a string representation of a TDateTime value with a given format.

Example

Program Example3;

{ This program demonstrates the DateTimeToStr function }

Uses sysutils;

Begin
  Writeln ('Today is : ',DateTimeToStr(Now));
  Writeln ('Today is : ',FormatDateTime('c',Now));
End.

Notes

 No notes exist for this page yet. 





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