Icon TimeToStr

Unit: WebCore

Available In: Client and Server Applications

function TimeToStr(Value: DateTime; UTC: Boolean=False): String

The TimeToStr function returns a formatted local or UTC time string for the DateTime input parameter. The format of the string is determined by the TFormatSettings ShortTimeFormat properties. The return value is a String value.

Examples

A := StrToTime('12:10 PM');
X := TimeToStr(A);  // X is '12:10 PM'
Image