cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Impactful Individual
Impactful Individual

How do I pass a valid date to my flow form a Canvas App

My flow is failing because the date is passed as

"3/16/2020" - which is incorrect. it should be 16/3/2020 - You guys have your month and day the wrong way round.
 
How do I ensure my app passes a valid date to the flow?
1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@stapes 

You can control the format of a date being passed to Flow using the TEXT function.

YourFlowName.Run(Text(your_date_here,"dd/mm/yyyy"))

 

There's also a quite useful post on how to do it inside Flow here.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Sending-dates-from-PowerApps-gt-Flow-gt-Shar...

 

I'm not sure who you are referring to as "you guys"...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @stapes ,

 

Is it a date picker you're using to generate the date? If so, then change the Format property of the date picker to:

 

"dd/mm/yyyy"
mdevaney
Super User
Super User

@stapes 

You can control the format of a date being passed to Flow using the TEXT function.

YourFlowName.Run(Text(your_date_here,"dd/mm/yyyy"))

 

There's also a quite useful post on how to do it inside Flow here.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Sending-dates-from-PowerApps-gt-Flow-gt-Shar...

 

I'm not sure who you are referring to as "you guys"...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

stapes
Impactful Individual
Impactful Individual

 
@Anonymous
 
 
 That doesn't work. I already had it set to that.
Pstork1
Dual Super User
Dual Super User

The order of the month and day in a date is dependent on the regional settings in the app.  Since you are passing it from Power Apps to Power Automate I would recommend passing it as a text variable and then converting it inside Flow.  You can then control the formatting of the date passed as text using the following formula in Power Apps

Text(Today(),"[$-en-US]dd/mm/yyyy")

Then in Flow you can convert it back when you want to use it.  You can't store a date as a variable in Power Automated anyway, so you need to convert it if you want to store it. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
ColinM
Frequent Visitor

What is the best way to pass date information from PowerApps to Flow with the PowerAppV2 trigger? Trying to add an input date to the trigger. 

 

Having problems configuring the string/date to match what Powerapps wants to send and what Flow wants to receive. 

 

Solved - case sensitive characters.  oops

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,990)