Updated on 2022-09-23 GMT+08:00

Date and Time Mode

The date and time in the EL expression can be displayed in a user-specified format. The date and time format is specified by the date and time mode character string. The date and time mode character string consists of letters from A to Z and from a to z, as shown in Table 1.

Table 1 Letter description

Letter

Description

Example

G

Epoch

AD

y

Year

2001

M

Month in a year

July or 07

d

Day in a month

10

h

Hour in the 12-hour clock

12

H

Hour in the 24-hour clock

22

m

Minute

30

s

Second

55

S

Millisecond

234

E

Day of a week

Mon, Tue, Wed, Thu, Fri, Sat, or Sun

D

Date in the year

360

F

Day in a week of a month

2(second Wed. in July)

w

Week in a year

40

W

Week in a month

1

a

A.M. /P.M.

PM

k

Hour in the 24-hour clock

24

K

Hour in the 12-hour clock

10

z

Time zone

Eastern Standard Time

'

Text delimiter

None

"

Single quotation mark

No example

Example

To obtain the date of the day before the planned scheduling time of a job, use the following EL expression:

#{DateUtil.format(DateUtil.addDays(Job.planTime,-1),"yyyy-MM-dd")}