| Unit: | SDL_stringl | | Class: | none | | Declaration: | function TimeString (Time: double; Fmt: byte):
string; |
The function TimeString converts a real number Time, which is looked upon as seconds into a string which represents this value in the usual time format. The format of the string is controlled by the parameter Fmt.
| Fmt |
Format |
Example |
| 0 |
HH:MM:SS.ss |
16:04:12.44 |
| 1 |
HH:MM:SS |
16:04:12 |
| 2 |
HHhMM |
16h04 |
| 3 |
HHhMM'SS" |
16h04'12" |
Negative values are formatted as '00:00:00.00'. If the value Time exceeds 24 hours, the hours are not wrapped around. The format of the hours will be expanded if necessary.
| Example: |
The statement "hstr := TimeString (77.3,1); " returns the string '00:01:17 ' to the variable hstr.
|
|