web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Label formula to updat...
Power Apps
Answered

Label formula to update datepicker

(0) ShareShare
ReportReport
Posted on by 7

I am creating an app where I have two User text fields: MONTH entered as 'mm' & YEAR  as 'yyyy'. I have a label whose default = "28/"&txtMonth.Text&"/"&txtYear.Text e.g. MONTH = 05, YEAR = 2021, LblPlannedDate = 28/05/2021 This works exactly as I wanted it .  When I put the default of the PlannedDate date picker field to = lblPlannedDate.Text the result is 05/04/2023 What do I need to get the Datepicker to pick up the correct date as per the label?

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Try entering the month format as 'MM'.  The lowercase 'mm' is used for minutes in Date time formats.

  • p4patricia Profile Picture
    7 on at

    Sorry I meant that the MONTH is just a text box where they enter the information as 01, 02, 03 etc., it is not a date format. So basically it is a label which pulls text boxes together. Is there a way to make the text field for Month a recognised date form of Month!?

  • Verified answer
    Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Use the datetimevalue() function in default date of the datepicker.  Something like this, with your regional setting.

    DateTimeValue(Concatenate(Month.Text,"/28/",Year.Text),"en-US")
  • p4patricia Profile Picture
    7 on at

    Thank you so much, this is exactly what I wanted. 🌟

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard