I need a dataweave function which extract fix string to convert it into ISO Date String format
fun convertToISO(dateString: String): String =
if (dateString == null)
""
else
try
((dateString[6 to -3] as Number) as DateTime {unit: "milliseconds"} as String)
catch (e)
"WRONG FORMAT"
but I also get error says , does anyone have idea how to solve this problem?
Invalid input '"', expected ? (line 8, column 13):
8| "WRONG FORMAT"
^
Location:
main (line: 8, column:13)