Times are stored in a proprietary internal format. However, times must be in OI's internal format when passed into properties. SRP ActiveX Controls will not parse string times on your behalf.
You can use any characters in the format, but 'H', 'h', 'M', 'm', 'S', 's', 'A', 'a', and '0' are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows:
Character(s) | Displays |
---|---|
h | Hours 0-23 |
hh | Hours 00-23 |
m | Minutes 0-59 |
mm | Minutes 00-59 |
s | Seconds 0-59 |
ss | Seconds 00-59 |
0 | Milliseconds 0-9 (rounded to the nearest tenth) |
00 | Milliseconds 00-99 (rounded to the nearest hundredth) |
000 | Milliseconds 000-999 |
a | a/p |
aa | am/pm |
aaa | a.m./p.m. |
A | A/P |
AA | AM/PM |
AAA | A.M./P.M. |
Only lowercase letters are used in the examples here, but uppercase are supported as well. However, lowercase is recommended because DateTime formatting uses lowercase 'm' to distinguish minutes from months.
Here are some example time formats, all of them for the time 3:30:30.345 PM:
To Display As | Use |
---|---|
3:30:30.345 PM | h:mm:ss.000 AA |
3:30:30.35 P.M. | h:mm:ss.00 AAA |
3:30:30.3 PM | h:mm:ss.0 AA |
03:30:30 P | hh:mm:ss A |
15:30:30 | h:mm:ss |
15:30 | h:mm |
The meeting is at 3:30pm | "The meeting is at" h:mmaa |