cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

@formatDateTime in "Update File properties" Help needed

My Post

I posted in the "Connecting to Data" and it I still can not find an answer. Can some one help?

1 REPLY 1
v-yuazh-msft
Community Support
Community Support

Hi @Anonymous,

 

What is the value of your expression "triggerBody()?['Updatefileproperties_ModelYear']"?

 

For your error message "The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Integer'", you must make sure the value of your expression "triggerBody()?['Updatefileproperties_ModelYear']" would be a string, since you want to formate the string to a date time, the staring should be datetime and should match ISO 8601 format.

 

I couldn't understand why are you would formate the date to only "yyyy",and would insert the "yyyy" to a date time type column in the sharepoint list.

 

If you would insert the "yyyy" to a date time type column in the sharepoint list, there is no any way to achieve your needs,because the "yyyy" String was not recognized as a valid DateTime.

 

Maybe you could formate the datetype value from powerapps to a type such as "yyyy/MM/dd", and you could refer to screenshot below to create the flow:

Capture.PNG

 

The expression should be:

formatDateTime(triggerBody()?['Updatefileproperties_ModelYear'],'yyyy-MM-dd')

 

 

Best regards,

Alice

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,009)