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 |
---|---|
YY | Years 00-99 |
YYYY | Years 0001-2999 |
M | Months 1-12 |
MM | Months 01-12 |
MMM | Months Jan-Dec |
MMMM | Months January-December |
MMMMM | Months J-D |
D | Days 1-31 |
DD | Days 01-31 |
DDD | Days Sun-Sat |
DDDD | Days 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, 2006 | MMMM D, YYYY |
Sunday, Jan 01, 2006 | DDDD, MMM DD, YYYY |
2006-01-01 | YYYY-MM-DD |
1/1/06 | M/D/YY |
Happy New Year! It's January 01! | "Happy New Year! It's" MMMM DD! |