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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date format in labels ...
Power Apps
Unanswered

Date format in labels and datacard

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I have a, hopefully, quick question regarding date formats. My datacards show dates as MM/DD/YYYY, however here we are using format DD/MM/YYYY, and Excel sheet has dates as the latter format. How can I make it so the date in labels (for checking info or formulas) and datacards show it as DD/MM/YYYY?

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    You can use the Text function to change the formats of your dates.

    In your case, you'd make the text property of the label Text(whateverDate, "dd/mm/yyyy")

     

    I hope that is helpful.

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

    That works perfectly for a label I use to test things in a gallery, however, I am not sure if I am doing it right or wrong in the case of a datacard in a form. In the form, I unlocked it to make changes to the 'text' condition, and typed:

    Text(Parent.Default,"dd/mm/yyyy")

    However, the info shown on it keeps being the same, no change whatsoever on the order itself.

    And after the 'enter', the app shows the code now as:

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

    What can I do?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    You might want to review information on the Language function. There are some specific statements in that document about determining the Language and/or Region.

    Text will use the information returned from the hosting session and operating system for the language.  If it cannot determine it, it will result in en-US.  You can override it in your text format as well.

     

    However, what is concerning to me is that you say you've changed the Text property of your control in your datacard to reflect this and there is no change. Which control did you change this on (presumably on the DataCardValuexx control)?  What kind of control is it - Label, TextInput, etc.?

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

    Not sure if it is affecting or not, but my internet connection and the PowerApps enviroment are both from the US, from the place I work at. I did try using [es-419] which I think was the correct one for my case, but didn't work.

    Also, it is a detail form, I unlocked the datacard I wanted to change, and added the Text( xx, "dd/yy/mmmm") on it, with xx=Parent.Default; on the Text property of the DataCardValue. I assume by the symbol in the list of screens it is a label, though.

     

    EDIT:

    What worked was to do the "text" thing on the datacard itself, on the Default property, thus ending as:
    Default: Text(ThisItem.'Comienzo Plan', "[$-en-US]dd/mm/yyyy]"

    And I know it worked because it also does not show the HH:MM it had as default (without changes, I mean)

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    Seems like that last edit did the trick for you.

    I would say though, just be careful with converting dates into other locales.  Not so much a problem from the conversion part, but, if you then use that localized date in another area, you will want to pay attention to the locale it was created under.  

    In other words, if you have "[$en-US]mm/dd/yyyy" and a result of 2/3/2019 (Feb 2 2019) and you then try to "use" that text value in a conversion (DateValue("2/3/2019") for example), AND the locale of the system that PowerApps is running is es, for example. Then you will end up with Mar 2 2019 from the conversion.

    Always best to keep dates as dates and only convert them for display.

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

    No worries on that part, the dates behind in the spreadsheet are in the 'correct' (local) format, it is only for seeing it on the app that I wanted to change it (:

  • Community Power Platform Member Profile Picture
    on at

    Edit / Addon:

    @RandyHayes Didn't mark as solved since I noticed something. I have an extra part where I leave the option to add a 'control date' so to speak, however, the date control is formatted as mm/dd/yyyy. Is it that way only or can it be changed to input as dd/mm/yyyy?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    What kind of control is the control date?

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

    Date? Not sure which one. However, I found the answer to this here:

    https://powerusers.microsoft.com/t5/General-Discussion/Change-Date-Format-in-Datepicker/td-p/38063

     

    (:

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    Ah, a DatePicker control.  Yes, you found your answer to that.

    By the way, you can always determine what kind of control you are dealing with by clicking on it and then in the Properties pane, at the top, it will tell you what kind of control it is.  That's always helpful to know so you can determine what you can do with it.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard