cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Parameter not valid for date conversion

I am working on a flow that transfer data from excel to dynamic 365.  For date conversion, I have formula below:

addDays('1899/12/30', int(items('ExceltoCRM')?['CallDate']),'yyyy-MM-dd')

This formula works when there is a date value in CallDate field but it generates below error when CallDate cell has no data.

 

InvalidTemplate. Unable to process template language expressions in action 'Create_a_new_record' inputs at line '1' and column '2654': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

how do I re-write the formula so that it will pass null or empty value as null for return value?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Visitor

Re: Parameter not valid for date conversion

Figured it out myself, the input was actually empty and not null, check for empty condition resolved this issue.

 

if(Empty(items('ExceltoCRM')?['CallDate']),null,addDays('1899/12/30', int(items('ExceltoCRM')?['CallDate']),'yyyy-MM-dd'))

View solution in original post

1 REPLY 1
Highlighted
Regular Visitor

Re: Parameter not valid for date conversion

Figured it out myself, the input was actually empty and not null, check for empty condition resolved this issue.

 

if(Empty(items('ExceltoCRM')?['CallDate']),null,addDays('1899/12/30', int(items('ExceltoCRM')?['CallDate']),'yyyy-MM-dd'))

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,098)