Announcements
Hi Guys!
In my app users select a date. I would like to make another text field take the selected day.
I tried using the left function but it didn't work.
My code was like this:
You can use the Text() function to format the selected date into just the day. Try this
Text(DataCardValue11,"dd")
It returns me the selected date
There does seem to be some weird behavior going on with the Data Card.
Make sure you're referencing the value of the control and not the control itself (DatePicker1.SelectedDate instead of DatePicker1).
You can also try this if nothing else works, this should:
First(Match(Text(DateValue1.SelectedDate),"^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$").SubMatches).Value
No need to complicate...
Day, Month, Year, Hour, Minute, Second, and Weekday functions in Power Apps - Power Platform | Microsoft Docs
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 393 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 278 Most Valuable Professional