cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Column Date given in formatDateTime but Flow gives error

 

I have the following expression:

 

@and(lessOrEquals(ticks(concat(formatDateTime(triggerBody()?['Vacation_x0020_Start_x0020_Date'], 'yyyy-MM-dd'), 'T00:00:00Z')), ticks(concat(formatDateTime(outputs('Compose_8'), 'yyyy-MM-dd'), 'T00:00:00Z'))), greaterOrEquals(ticks(concat(formatDateTime(triggerBody()?['Vacation_x0020_End_x0020_Date'], 'yyyy-MM-dd'), 'T00:00:00Z')), ticks(concat(formatDateTime(outputs('Compose_8'), 'yyyy-MM-dd'), 'T00:00:00Z'))))

 

It fails to run with the following error:

 

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2502': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

Thank you,

Deddy Andy.

3 REPLIES 3
Community Support
Community Support

Hi @deddyandy,

 

The error message says that the provided value for the function formatDateTime is of type null. Do you have value in the field?

 

I have made a simple test on my side. The trigger is SharePoint when an item is created, and there is a Date column in the list. When a new item is created with value in the Date column, it will run succeed. While if it is blank, it runs failed.

1.PNG

 

Please make sure there is value in the field you are going to use. Please try again with it.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper II
Helper II

Hi @v-yamao-msft,

 

All of the parameters have value. Please find the following source of Vacation_Start_date & Vacation_End_Date:

Capture1.PNG

 

 

and Compose_8:Capture3.PNG

 

 

Capture2.PNGRegards,

Deddy Andy

 

 

 

 

Regular Visitor

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2628': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

I am facing abov mentione error while running flow. please help.

 



 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (31,478)