Reply
Level: Power Up
Posts: 3
Registered: ‎06-20-2016
Accepted Solution

Date display format

I've just started checking out power apps and thought I would setup a simple fuel expense tracking app.  I have data already in a spreasheet in onedrive for business and I have linked to that.

 

the problem is that the date is displaying with the time.  I don't want the time, just the date.  I have tried to format it but I'm just not having any joy.

 

If someone could point me in the right direction that would be much appreciated.

 

screen shot showing data layout - http://screencast.com/t/JEZfcvKfQ

 

Thanks

Nathan

 

 


Accepted Solutions
PowerApps Staff
Posts: 363
Registered: ‎05-04-2016

Re: Date display format

[ Edited ]

In some locales the separator for formulas isn't the comma ( , ), but semicolon ( ; ). Can you try replacing your formula with the value below, to see if it helps?

Text(PurchaseDate; "dd/mm/yyyy")

  

View solution in original post


All Replies
Level 10
Posts: 766
Registered: ‎04-26-2016

Re: Date display format

Hi

 

There are various thread talking about this.

Text(DatePicker1.SelectedData, "dd/mm/yyyy") is one of the choice when you are Patching / Saving.

..Patch(TableX, Defaults(TableX), {............, MyDate: Text(DatePicker1.SelectedDate, "dd/mm/yyyy"), ...}

 

Hope this helps. TQ

hpkeong
Level 10
Posts: 256
Registered: ‎05-20-2016

Re: Date display format

[ Edited ]

You need to substitute this: Text(PurchaseDate, "dd/mm/yyyy")

instead of PurchaseDate

 

This may require unlocking the card of your display form

Level: Power Up
Posts: 3
Registered: ‎06-20-2016

Re: Date display format

When I do that I get nothing..  maybe I"ll just stick with infrastructure. Clearly there's something fundamental that I'm not understanding here.

 

 date1.JPG

PowerApps Staff
Posts: 363
Registered: ‎05-04-2016

Re: Date display format

[ Edited ]

In some locales the separator for formulas isn't the comma ( , ), but semicolon ( ; ). Can you try replacing your formula with the value below, to see if it helps?

Text(PurchaseDate; "dd/mm/yyyy")

  

Level: Power Up
Posts: 3
Registered: ‎06-20-2016

Re: Date display format

Thank you very much!!!!

 

will see how long until my next road block ;-)

 

I'm doing a presentation next week around office 365 and thought it would be cool to show some of this sort of stuff.

Highlighted
Level: Powered On
Posts: 50
Registered: ‎03-21-2017

Re: Date display format

I tried using Text(DataCardValue21,"DD/MM/YYYY") in a function and it converted it to Text(DataCardValue21,"[$-en-US]DD/MM/YYYY") which still gives me the wrong format so I tried changing it to Text(DataCardValue21,"[$-en-AU]DD/MM/YYYY") and it won't display anything. 

 

I have set my PC to Region Australia with all the associated formats to be in DD/MM/YYYY format. I have also set my Chrome Browser to that format. When I run an app on my phone it displays in DD MMMM, YYYY format and on my desktop PowerApps it displays in MM/DD/YYYY format. Is there any way I can get it to universally accept that in Australia we use DD/MM/YYYY format?

PowerApps Staff
Posts: 368
Registered: ‎04-29-2016

Re: Date display format

I am going to guess that DataCardValue21 is not a Date but a string, so the Text function will ignore all attempts to format it.

 

If my assumption is correct you will need to first turn that string into a date, eg with

Text(DateValue(DataCardValue21), "dd/mm/yyyy")
Andy Pennell, Software Engineer: PowerApps
Level: Powered On
Posts: 50
Registered: ‎03-21-2017

Re: Date display format

Maybe I am not understanding properly.

 

DataCardValue 21 has is set up as shown in the screen prints below.

It is connected to an Access table that was converted to SQL Azure so it's still linked to that SQL table where it is definitely set up as a date/time field. 

All the regional settings are set to Australia where it's dd/mm/yyyy format but as can be seen below it is displaying as mm/dd/yyyy

 

temp.jpg

 

 

 temp.png

 

PowerApps Staff
Posts: 368
Registered: ‎04-29-2016

Re: Date display format

Australia is not a directly supported locale in PowerApps: it will use the "en" locale instead. If you want your dates displayed in a specific format, you will need to tell it so, either with a specific format (eg "dd/mm/yyyy") or with a language argument that matches your requirements (eg "en-GB" for this particular date format).

Andy Pennell, Software Engineer: PowerApps