cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ananda
Resolver I
Resolver I

Passing date into Flow as parameter throwing error for SharePoint date column.

Passing date into Flow as parameter throwing error for SharePoint date column.
PowerApp Code -

Text(DataCardValue13.SelectedDate,"[$-en-US]mm/dd/yyyy","en-US")

Error - string 'mm/dd/yyyy/' does not validate against format date,

In flow I've also used formatdatetime.

Code - formatdatetime(triggerBody()['Updatefileproperties_EndDate'],'mm/dd/yyyy')

But same result.

Any thoughts on this..?

Appreciate your reply on this.

Thank you.

ananda

1 ACCEPTED SOLUTION

Accepted Solutions

I've tried below code and it worked. It's not the Upper Case vs Lower Case.


Text(DataCardValue13.SelectedDate, "[$-en-US]yyyy-mm-dd").

It's quite strange.

Thank you.

 

View solution in original post

7 REPLIES 7
haroldbk_msft
Community Support
Community Support

SharePoint Dates are usually formatted yyyy-MM-dd

Need to use uppper case M for month since lower case m is minutes

 

Tried

Text(DataCardValue13.SelectedDate,"[$-en-US]MM/DD/YYYY","en-US"),

Same error.

Thanks

try this 

Text(DataCardValue13.SelectedDate,"[$-en-US]yyyy-MM-dd","en-US"),

Using all caps is not right and it should be year month day for SharePoint dates

I've tried below code and it worked. It's not the Upper Case vs Lower Case.


Text(DataCardValue13.SelectedDate, "[$-en-US]yyyy-mm-dd").

It's quite strange.

Thank you.

 

Anonymous
Not applicable

Yo tengo el mismpo problema y con la solucion que comentas no se ha solucionado

 

Les comaprto el error que me aparece

 

JacquelineRiiv_0-1610394149266.png

This worked for me, and note that my SharePoint time format is UK (dd/mm/yyyy), but once passed from PowerApps > Power Automate > SharePoint List the date was automatically converted from UK to US.

jed76
Post Patron
Post Patron

I've tried everything here and I still get the error?

 

I am not using a date picker, but simply text. When I try something like Text(ThisItem.To,"yyyy/mm/dd") I still get the STRING issue?

 

ThisItem is the SP List and To is a date text column?

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,721)