Compability: Internet Explorer
-
Syntax:
- xtlRuntime.formatTime(varTime, bstrFormat, varDestLocale)
- varTime
- This is the time to be formatted.
- bstrFormat
- This is the formatting to be applied. The time can be formatted using the codes in the bstrFormat Codes table.
- varDestLocale
- The 'varDestLocale' parameter determines the sequence to be used in displaying the time, depending on
locale.
This method formats the supplied time using the specified formatting options.
The 'varDestLocale' parameter determines the sequence to be used in displaying the time, depending on
locale. The 'bstrFormat' parameter supports the following codes:
bstrFormat Codes
- h
hours as 0-23
- hh
hours as 00-23
- m
minutes as 0-59
- mm
minutes as 00-59
- s
seconds as 0-59
- ss
seconds as 00-59
- AM/PM
display hours as 12 hour clock, inserting 'AM' or 'PM'
- am/pm
display hours as 12 hour clock, inserting 'am' or 'pm'
- A/P
display hours as 12 hour clock, inserting 'A' or 'P'
- a/p
display hours as 12 hour clock, inserting 'a' or 'p'
- [h]:mm
elapsed time in hours; for example, 26.25
- [mm]:ss
elapsed time in minutes; for example, 72.51
- [ss]
elapsed time is seconds
- ss.00
fractions of a second