Showing results for 
Search instead for 
Did you mean: 
Not applicable

@formatDateTime in "Update File properties" Help needed

I have a "ModelYear" column in SPList formatted as Date field.

In PowerApps I am passing Text(drpMfgYear.Selected.Value) to a Run call to flow:Run(Text(drpMfgYear.Selected.Value)) along with some other fields required by flow.

In the flow, I have formatDateTime(triggerBody()?['Updatefileproperties_ModelYear'],'yyyy').

Flow fails with error message:

Unable to process template language expressions in action 'Update_file_properties' inputs at line '1' and column '1935': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Integer'. Please see for usage details.'.


What am I doing wrong? Please help.



Community Support
Community Support

Hi @Anonymous,


According to your description, I have created a flow likes below, it doesn’t return any error message as you mentioned.


There is Date column in the SharePoint library. I am trying to pass date value from PowerApps to the column via flow.


The flow is triggered by PowerApps button, in the Due date column, using the following code to format date time.




On the app, I get the date from a DatePicker control.


When I click the PowerApps button, the flow is triggered then the DueDate is updated properly.


Please take it for a reference.



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.
Not applicable

@v-yamao-msft wrote:

Hi @Anonymous,



I am trying to pass date value from PowerApps to the column via flow.


Best regards,

Mabel Mao

Hello SIr Mao,

Thankd for your replay and suggestion. Your test condition differs from mine. I am getting an error that I am passing Integer Value instead of time date value to the flow . I tried to create a time date value and then pass it to the flow but I still get the error.

Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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!

Top Solution Authors
Top Kudoed Authors
Users online (5,786)