Search code examples
timestampmulemule-eldate-conversion

TimeStamp Convertion in mule esb


I need to capture file last modified date in yyyy-MM-dd format.

I tried #[message.inboundProperties.timestamp] but getting timestamp like 142565954.

Yes, I know it can be done using goovy or java.

Please can anybody suggest to convert the timestamp 142565954 to yyyy-MM-dd format with mule expression language?


Solution

  • Please reference the below link: https://docs.mulesoft.com/mule-user-guide/v/3.6/mule-expression-language-date-and-time-functions

    Try something like this :

    #[new org.mule.el.datetime.DateTime(new Date(message.inboundProperties.timestamp),"E MMM dd HH:mm:ss z yyyy")]