cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deddyandy
Level: Powered On

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 Team
Community Support Team

Re: Column Date given in formatDateTime but Flow gives error

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.
deddyandy
Level: Powered On

Re: Column Date given in formatDateTime but Flow gives error

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

 

 

 

 

SRK2405
Level: Powered On

Re: Column Date given in formatDateTime but Flow gives error

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,114)