We have one requirement where we need to check whether the input date is valid UTC format or not, if not we need to append zeroes to it. We are trying to implement in DW since it is the part of complex logic. but we are not able to convert and validate the date in DW. could you please help. %dw 1.0 %output application/java
%var d= "2013-10-13T01:37:56" as :date
{ endDate:"" when (d == null or d == "") otherwise ( d when ( d is :date {format: 'yyyy-MMM-ddHH:mm:ss'}) otherwise (d as :date {format: "yyyy-MM-dd'T'HH:mm:ss"}) )
} Thanks Sushma