Sunday, May 31, 2009

Format Date in Oracle BPEL

Often I have noticed that our applications vary largely on the formats required for date. But the date conversion in Oracle BPEL does not work when using the format 'mm/dd/yy' or 'mmddyy'.The correct format for converting

current date to date like 12 dec 2009 is

xp20:format-dateTime(xp20:current-dateTime(),'[D]-[[MN,*-3]-[Y]').
current date to date like 091212 is

xp20:format-dateTime(xp20:current-dateTime(),'[Y01][M01][D01]')
current date to date like 12122009 is

xp20:format-dateTime(xp20:current-dateTime(),'[M01][D01][y0001]'


2 comments:

  1. suz!!! its me Lekha!! send me a mail!

    ReplyDelete
  2. Hi,

    Thank you very much for the info. I didn't find this info in any documentation. I am trying your suggestion in 11g SOASuite on sun OS. I am not having any luck to convert the date to 3 letter month. I see an issue with extra square bracket ([)

    Is this the right format?
    xp20:format-dateTime(xp20:current-dateTime(),'[D]-[MN,*-3]-[Y]').

    Where do I find documentation for this? I really appreciate your help.

    Srini

    ReplyDelete