If the dateTime object is CWF Packed Decimal, you can only use the symbols that are presented as numbers. For all other Physical Type options, you can use all symbols.
You can specify the dateTime format using a string of pattern letters. The count of pattern letters determines the format. The table of dateTime formatting symbols below defines the letters that are reserved as pattern letters:
Symbol | Meaning | Presentation | Example |
---|---|---|---|
a | am or pm marker | Text | pm |
d | day in month | Number | 10 |
D | day in year | Number | 189 |
e | day in week (1-7) | Number | 2 |
E | day in week | Text | Tuesday |
F | day of week in month | Number | 2 (2nd Wed in July)3 |
G | Era | Text | AD |
h | hour in am or pm (1-12) | Number | 12 |
H | hour in day (0-24) | Number | 0 |
I | Parse as Date/Time (ISO8601) | (note 6) | |
k | hour in day (1-24) | Number | 24 |
K | hour in am or pm (0-11) | Number | 0 |
m | minute in hour | Number | 30 |
M | month in year | Text and Number | July and 07 |
w | week in year | Number | 272 |
W | week in month | Number | 2 |
s | second in minute | Number | 55 |
S | millisecond | Number | 978 |
T | Parse as Time (ISO8601) | (note 6) | |
y | year | Number | 19961 |
Y | year: use with week in year only | Number | 19962 |
z | TimeZone | Text | zzzz = Pacific Standard Time |
Z | time zone | Text | +05:30 |
' | escape for text | 'User text' | |
'' | single quote within escaped text | 'o''clock' |
The presentation of the dateTime object depends on what symbols you specify as follows:
Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] are treated as quoted text. For example, characters like colon (:), comma (,), period (.), the number sign (hash or pound, #), the at sign (@) and space appear in the resulting time text even if they are not enclosed within single quotes.
The following points explain the notes in the table above:
For example, if the string 2002 01 Monday is formatted:
Y should only be used in conjunction with w. If you specify Y without w, the year is ignored. For example, if you specify YYYY-mm-dd to format 1996-03-01 the result is 2002-03-01 because the year input is ignored and the current year is assumed.
On input to a message flow, a format string of I allows any ISO8601 compliant dateTime to be parsed. On output from a message flow, the dateTime is always expressed in the fullest form yyyy-MM-dd'T'HH:mm:ss.SSS.
If you use the T formatting symbol, format strings can be constructed to match ISO8601 dateTimes where T precedes the time portion of a dateTime entity.
The following table shows examples of dateTime formats:
Format pattern | Result |
---|---|
"yyyy.MM.dd'at'HH:mm:ss ZZZ" | 1996.07.10 at 15:08:56 -05:00 |
EEE, MMM d, "yy" | Wed, July 10, '96 |
"h:mm a" | 8:08 PM |
"hh 'o''clock' a, ZZZZ" | 09 o'clock AM, GMT+09:00 |
"K:mm a, ZZZ" | 9:34 AM, -05:00 |
"yyyy.MMMMM.dd hh:mm aaa" | 1996.July.10 12:08 PM |
The following are ISO8601 dateTime examples:
Year yyyy Year and month yyyy-MM Complete date yyyy-MM-dd Complete date plus hours and minutes yyyy-MM-ddTHH:mm Complete date plus hours, minutes, and seconds yyyy-MM-ddTHH:mm:ss Complete date plus hours, minutes, seconds, and a decimal fraction of a second yyyy-MM-ddTHH:mm:ss.S
You can create formatting strings that produce unpredictable results, so you must use these symbols with care. For example, if you specify dMyyyy, it is impossible to distinguish between day, month, and year. dMyyyy tells the broker that a minimum of one character represents the day, a minimum of one character represents the month, and four characters represent the year. Therefore 3111999 could be interpreted as 3/11/1999 and 31/1/1999.
Related concepts
Message modeling
The message model
Related tasks
Developing message models
Working with a message definition file
Working with message model objects
Related reference
Message model reference information
Message model object properties
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ad09290_ |