0
votes

I am using dataformat conversion inside DataMapper script in Mule.

dateTimeFormatter = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

output.Date_of_Rate_Float__c = (isnull(input.Date_of_Rate_Float) ? null : dateTimeFormatter.format(input.Date_of_Rate_Float));

When I am trying to save the mapping. I am getting below error

Root Exception stack trace:
org.apache.commons.beanutils.ConversionException: DateConverter does not support default String to 'Date' conversion.
at org.apache.commons.beanutils.converters.DateTimeConverter.toDate(DateTimeConverter.java:468)

But when I remove the dateTimeFormatter, I am not getting any error. I need to use dateconversion, is there any other way to resolve this.

Thanks in advance.

1

1 Answers

0
votes

You were keeping Date datatype as string and trying to format the date. Change the Date datetype as DATETIME and the do the conversion.