我的要求是將字符串轉換爲騾子使用DataWeave使用DataWeave
輸入字符串
8/30/2015 4:00:13 PM
輸出日期必須在日期格式MM/DD/YYYY格式即
08/30/2015
我使用下面的邏輯
(($[1] splitBy " ")[0]) as :date{format:"[m01]/[d01]/[y0001]"}
已經嘗試
這給
Exception while executing:
"Order Date":(($[1] splitBy " ")[0]) as :date{format:"[m01]/[d01]/[y0001]"},
Cannot coerce a :string to a :date ^
我使用的騾子Anypoint Studio版本錯誤:5.2.0
這是一個Java腳本,而我的要求是用騾子功能或騾子表達語言。謝謝各位 –