简体   繁体   中英

Mule MEL Date Time Format

I am trying to output data in DD-MON-YY(22-OCT-15) format to insert into an Oracle DB. I used the MEL expression server.dateTime.format("dd-MMM-yy") . This outputs data as 22-Oct-15 . See fragment below.

<expression-component doc:name="Expression"><![CDATA[if ( flowVars.collection_opening_date == null){
    flowVars.collection_opening_date = server.dateTime.format("dd-MMM-yy");
}]]></expression-component>

There is no error from this snippet. server.dateTime.format("dd-MMM-yy") outputs as 22-Oct-15 and my desired format is 22-OCT-15 . How can I get my desired format?

像这样大写: server.dateTime.format("dd-MMM-yy").toUpperCase().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM