The eWay uses the Java simple default date and time format syntax (U.S. locale). To specify these formats for name pattern, you must use a time pattern string.
The eWay uses the Java standard for date/time stamps from the Java class java.text.SimpleDateFormat. Some of these formats can differ from the list given here, depending on the Java SDK version you are using.
In these patterns, all ASCII letters are reserved as pattern letters. See Table 58 for a complete list.
Table 58 Time Pattern Strings and Meanings
Symbol |
Meaning |
Presentation |
Example |
---|---|---|---|
%G |
Era designator |
Text |
AD |
%y |
Year |
Number |
1996 |
%M |
Month in year |
Text and number |
July & 07 |
%d |
Day in month |
Number |
10 |
%h |
Hour in a.m./p.m. (1 through12) |
Number |
12 |
%H |
Hour in day (0 through 23) |
Number |
0 |
%m |
Minute in hour |
Number |
30 |
%s |
Second in minute |
Number |
55 |
%S |
Millisecond |
Number |
978 |
%E |
Day in week |
Text |
Tuesday |
%D |
Day in year |
Number |
189 |
%F |
Day of week in month |
Number |
2 (second Wednesday in July) |
%w |
Week in year |
Number |
27 |
%W |
Week in month |
Number |
2 |
%a |
Marker for a.m./p.m. |
Text |
PM |
%k |
Hour in day (1 through 24) |
Number |
24 |
%K |
Hour in a.m./p.m. (0 through 1) |
Number |
0 |
%z |
Time zone |
Text |
Pacific Standard Time |
The general rules for date/time formats are:
Text: The count of pattern letters determines the format as follows:
For four or more pattern letters, use the full form.
For fewer than four, use the short or abbreviated form if one exists.
Number: The minimum number of digits as follows:
Shorter numbers are zero-padded to this amount.
The year is handled differently; that is, if the count of “y” is two, the year is truncated to two digits.
Text and number: For three or more pattern letters, use text; otherwise use a number.
Quotes and delimiters: Use these symbols as follows:
Enclose literal text you want rendered within single quotes.
Use double quotes to mean single quotes.
Use commas for delimiters.
Format Pattern |
Result |
---|---|
yyyy.MM.dd, G, ’at’ hh:mm:ss, z |
1996.07.10 AD at 15:08:56 PDT |
E, M, dd, ’’yy |
Wednesday, July 10, ’96 |
h:mm, a |
12:08 PM |
h, ’o’’clock’ a, z |
12 o’clock PM., Pacific Daylight Time |
K:mm a, z |
0:00 p.m., PST |
yyyyy.M.dd, G, hh:mm, a |
1996.July.10 AD 12:08 PM |