DateTimes are stored in a proprietary internal format. However, date & times must be in OI's internal format when passing them to properties. SRP ActiveX Controls will not parse string date & times on your behalf.

You can use any characters in the format, but 'Y', 'y', 'M', 'm', 'D', 'd', 'H', 'h', '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
YYYears 00-99
YYYYYears 0001-2999
MMonths 1-12
MMMonths 01-12
MMMMonths Jan-Dec
MMMMMonths January-December
MMMMMMonths J-D
DDays 1-31
DDDays 01-31
DDDDays Sun-Sat
DDDDDays Sunday-Saturday
hHours 0-23
hhHours 00-23
mMinutes 0-59
mmMinutes 00-59
sSeconds 0-59
ssSeconds 00-59
0Milliseconds 0-9 (rounded to the nearest tenth)
00Milliseconds 00-99 (rounded to the nearest hundredth)
000Milliseconds 000-999
aa/p
aaam/pm
aaaa.m./p.m.
AA/P
AAAM/PM
AAAA.M./P.M.

Note that 'M' must be used for months and 'm' for minutes. All other codes can be either case.

Here are some example date & time formats, all of them for the date & time January 1, 2006 at 3:30:30.245 PM:

To Display As
Use
January 1, 2006 at 3:30 PMMMMM D, YYYY 'at' h:mm aa
Sunday, Jan 01, 2006DDDD, MMM DD, YYYY
2006-01-01 15:30:30YYYY-MM-DD hh:mm:ss
  • No labels