FormatDateTime

Declaration: FormatDateTime (Format: string; Date: TDateTime): string;
Formats the value given by Date using the format specified by the parameter Format. If the string specified by the Format parameter is empty, the Date value is formatted using the date/time format of the system.

See the Date/Time Format Mask table for information about the supported format strings.