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



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

DateToStr

Converts a TDateTime value to a date string with a predefined format.

Declaration

Source position: datih.inc line 117

function DateToStr(

  Date: TDateTime

):String;

Description

DateToStr converts Date to a string representation. It uses ShortDateFormat as it's formatting string. It is hence completely equivalent to a FormatDateTime('ddddd', Date).

Errors

None.

See also

TimeToStr

  

Convert a TDateTime time to a string using a predefined format.

DateTimeToStr

  

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

FormatDateTime

  

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

StrToDate

  

Convert a date string to a TDateTime value.

Example

Program Example7;

{ This program demonstrates the DateToStr function }

Uses sysutils;

Begin
  Writeln(Format ('Today is: %s',[DateToStr(Date)]));
End.

Notes

 No notes exist for this page yet. 





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