Datetime coercion with DataWeave in Mulesoft

Photo by Sigmund on Unsplash

I was extracting data from a json object and feeding it to another service but was running into this coercion error.

Cannot coerce String to DateTime

You may this similar error as well