Skip to main content

Notifications

Community site session details

Community site session details

Session Id : SkSLl9sUaXNDBrwajvltuU
Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Format a Date dd.mm.yyyy into yyyy-mm-dd in power Apps

Like (1) ShareShare
ReportReport
Posted on 4 Oct 2024 11:06:12 by 8
Hello Everybody
 
I am trying to format a date from dd.mm.yyyy into yyyy-mm-dd.
 
I found the following formula on the internet, but it does not work. 
 
DateValue(DataCardValue.SelectedDate; "yyyy/mm/dd")

Can anyone help me?
 
Thank you in advance
  • CarlosFigueira Profile Picture
    on 04 Oct 2024 at 14:01:29
    Format a Date dd.mm.yyyy into yyyy-mm-dd in power Apps
    If the DataCardValue is a date picker control (that already gives you the a date value), then you can use the Text function to format it as you want:
    Text(
      DataCardValue.SelectedDate,
      "yyyy-mm-dd"
    )
    If the date you have is a text value, then you can use the DateValue function to convert that into a date value. The second argument of DateValue is a locale, and the date will be parsed in that locale. In "dd.mm.yyyy" is the default format for the de-DE locale, so you can use an expression like the following:
    Text(
      DateValue(<your date as text>, "de-DE"),
      "yyyy-mm-dd"
    )
    Hope this helps!
  • Suggested answer
    abc 123 Profile Picture
    784 Super User 2025 Season 1 on 04 Oct 2024 at 14:00:36
    Format a Date dd.mm.yyyy into yyyy-mm-dd in power Apps
    //Use intrinsic date formats based on region
    UpdateContext({strWrongFormat: "04.10.2024"});
    UpdateContext({dtmRightFormatEn: DateValue(strWrongFormat,"en") });
     
    //Take full control
    UpdateContext({strDay: Left(strWrongFormat,2)});
    UpdateContext({strMonth: Mid(strWrongFormat,4,2)});
    UpdateContext({strYear: Right(strWrongFormat,4)});
     
    UpdateContext({dtmRightFormatCustom: DateValue(strMonth & "/" & strDay & "/" & strYear) });


     
     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 59 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard
Loading started