Dates are stored in a proprietary internal format. However, dates must be in OpenInsight's internal format when passed into properties. SRP ActiveX Controls will not parse string dates on your behalf.

You can use any characters in the format, but 'Y', 'y', 'M', 'm', 'D', and 'd' 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

Only uppercase letters are used in the examples here, but lowercase are supported as well. However, uppercase is recommended because DateTime formatting uses capital 'M' to distinguish months from minutes.

Here are some example date formats, all of them for the date January 1, 2006:

To Display As
Use
January 1, 2006MMMM D, YYYY
Sunday, Jan 01, 2006DDDD, MMM DD, YYYY
2006-01-01YYYY-MM-DD
1/1/06M/D/YY
Happy New Year! It's January 01!"Happy New Year! It's" MMMM DD!
  • No labels