Q: Convert MongoDB date format from strict JSON in Mule? I have a Mule flow that's returning data from a MongoDB database. Currently the dates are being returned in the format "lastLoginDate" : { "$date" : 1382456335880}, but I need to return it in the format "lastLoginDate" : { "Timestamp":"2013-10-22T15:39:07.070Z"}. How can I accomplish this in Mule? Right now the only transformer is the Mongo-collection-to-JSON.

A: In case You still need to convert it into the desired format, then you can use this transformation: Timestamp: (1382456335880 / 1000) as :datetime. The result will be: "Timestamp": "2013-10-22T15:38:55Z"
Notes: value is divided by 1000, because the input is in milliseconds and DataWeave requires it in seconds.
