Important date functions in Oracle BPEL:
Format-dateTime:
This function returns the formatted string of dateTime using
the format provided.
xp20:format-dateTime(dateTime as string, format as string)
- dateTime – The dateTime to be formatted
- format – The format for the output
Format String:-
Format Date Time: Year
Example
|
Expression
|
2012
|
[Y0001]
|
2012
|
[Y]
|
12
|
[Y01]
|
Two Thousand and Twelve
|
[YWw]
|
Format Date Time: Month
Example
|
Expression
|
08
|
[M01]
|
8
|
[M]
|
VIII
|
[MI]
|
August
|
[MNn]
|
AUGUST
|
[MN]
|
Aug
|
[MNn,*-3]
|
AUG
|
[MN,*-3]
|
Format Date Time: Day
Example
|
Expression
|
05
|
[D01]
|
5
|
[D]
|
5
|
[D1]
|
31st
|
[D1o]
|
Tuesday
|
[FNn]
|
Format Date Time: Hour
Example
|
Expression
|
3
|
[h]
|
9
|
[H]
|
08
|
[H01]
|
Format Date Time: Minute
Example
|
Expression
|
03
|
[m01]
|
3
|
[m]
|
Format Date Time: Second
Example
|
Expression
|
09
|
[s01]
|
9
|
[s]
|
Format Date Time: Millisecond
Example
|
Expression
|
257
|
[f001]
|
Format Date Time: AM/PM
Example
|
Expression
|
PM
|
[PN]
|
Am
|
[Pn]
|
Format Date Time: GMT
Example
|
Expression
|
GMT+02:00
|
[z]
|
Example:-
xp20:format-dateTime(xp20:current-dateTime(),"[D01]/[M01]/[Y0001]
[H01]:[m01]:[s01]")