Try OpenEdge Now
skip to main content
Customization Guide
Customizing Properties files : Customizing the date format in Business Process Portal
 

Customizing the date format in Business Process Portal

The Management module uses the Java class SimpleDateFormat to display times and dates, which you can configure using the DateFormat parameter in the bpmportal.properties file in your %AppServer%\WEB-INF\classes\properties directory (There may also be property files for each available language—for example, bpmportal_en.properties for English, bpmportal_ja.properties for Japanese in this directory). The conf parameter which specifies the '%AppServer%' location is param name="appserver.home". Under this system, use a time pattern string to specify the specific time and date format for your date format (in bpmportal.properties) or for a specific language (e.g., to change a date format only for Japanese, open the bpmportal_ja.properties). Additionally, you need to make the same changes in the bpmportal.properties and the property file for each available language in the %OEBPS_HOME%\conf\properties directory. ASCII letters are reserved as pattern specifiers in the SimpleDateFormat pattern, and the symbols are defined in the following table:
Table 4. SimpleDateFormat time pattern strings
Symbol
Meaning
Presentation
Example
G
era designator
Text
AD
y
year
Number
1996
M
month in year
Text & Number
July & 07
d
day in month
Number
10
h
hour in am/pm (1~12)
Number
12
H
hour in day (0~23)
Number
19
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 (2nd Wed in July)
w
week in year
Number
27
W
week in month
Number
2
a
am/pm marker
Text
PM
k
hour in day (1~24)
Number
24
K
hour in am/pm (0~11)
Number
11
z
time zone
Text
Pacific Standard Time
Note: As indicated in Table 4, DateFormat is case-sensitive.
Refer to the following rules when using time and date formats:
*The number of pattern letters determines the format, according to the following:
*(Text): If there are four or more pattern letters, use the full form. If there are less than four pattern letters, use the short or abbreviated form, if one exists.
*(Number): The minimum number of digits. Shorter numbers are zero-padded to this amount. Year, however, is handled specially—if the count of ‘y’ is two, the Year will be truncated to two digits.
*(Text & Number): Three or more, use text, otherwise use number.
*Characters in the pattern that are not in the ranges of [‘a’..‘z’] and [‘A’..‘Z’] are treated as quoted text. For instance, characters such as ‘:’, ‘.’, ‘ ‘, ‘#’ and ‘@’ appear in the resulting time text even though they are not specified within single quotes.
*A pattern containing an invalid pattern letter results in an exception except during formatting.
The default date format setting for Business Process Server applications is MM/dd/yyyy, which displays a date of February 18, 2006 as 02/18/2006. The following table presents examples of the date format pattern using U.S. locales:
Table 5. Format pattern examples for U.S. locales
Format pattern
Result
"MM/dd/yyyy (default)
07/10/2006
"yyyy.MM.dd G ‘at’ hh:mm:ss z"
2006.07.10 AD at 15:08:56 PDT
"EEE, MMM d, ‘yy"
Mon, July 10, ‘06
"h:mm a"
12:08 PM
"hh ‘o’’clock’ a, zzzz"
12 o’clock PM, Pacific Daylight Time
"K:mm a, z"
0:00 PM, PST
"yyyyy.MMMMM.dd GGG hh:mm aaa"
2006.July.10 AD 12:08 PM