cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deddyandy 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

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 Helper II
Helper II

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
Regular Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,737)