Description |
The TimeSeparator variable is used in date and time display functions between hour, minute and second values.
TimeSeparator value is ':' by default, depending on the Windows locale.
|
| Notes | DateSeparator = LOCALE_STIME by default.
| | Related commands | |
Download this web site as a Windows program.
|
|
|
|
Example code : Changing the time display separator character | var
mydate : TDateTime;
begin
myDate := EndOfAMonth(2000, 2);// 29th Feb 2000 at 23:59:59.999
LongTimeFormat := 'hh:mm:ss.zzz'; // Show milli-seconds
ShowMessage('Date = '+DateTimeToStr(myDate));
TimeSeparator := '_'; // Override the : time separator
ShowMessage('Date now = '+DateTimeToStr(myDate));
end;
| Show full unit code | Date = 29/02/2000 23:59:59.999
Date now = 29/02/2000 23_59_59.999 |
|
|