My requirement is to convert a string to a date format using DataWeave in Mule
Input string
8/30/2015  4:00:13 PM
Output date needs to be in MM/DD/YYYY format i.e,
08/30/2015 
i have tried using the below logic
(($[1] splitBy " ")[0]) as :date{format:"[m01]/[d01]/[y0001]"} 
this gave the error
Exception while executing: 
"Order Date":(($[1] splitBy " ")[0]) as :date{format:"[m01]/[d01]/[y0001]"},
 Cannot coerce a :string to a :date                                                                                                                                                          ^
I am using Mule Anypoint Studio Version: 5.2.0
 
     
     
     
     
    