cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

Text(Today(), DateTimeFormat.ShortDate) reports differently on mobile from desktop

My app uses Text(Today(), DateTimeFormat.ShortDate) to send the text value of today's date to a SharePoint list. When I do this from a web browser on my desktop it reports today as 4/1/2020. When I use the iOS PowerApps app it reports today as April 1, 2020. I really don't care which it reports but why is it not consistent? That is really what I need here.

1 ACCEPTED SOLUTION

Accepted Solutions
Advocate V
Advocate V

In my experience, this behaviour may be caused by localization of your device/OS/browser. I'm not entirely certain how the end result is determined, though. Even if you specify an explicit language code, it may be overridden or fall back to default. 

 

I think if you use a custom format that only uses numbers (like 'dd mmmm YYYY'), you can get a consistent behaviour.

 

Be wary when using the text options though. For example, in some of my apps I use 'Text(date, "[$-nl-NL]dddd dd mmmm yyyy")' to display a date; but I observed that if my browser language is set to English, it doesn't display the date in Dutch. And if I view it on my device, and the device language is set to English, it also displays the English text.

View solution in original post

2 REPLIES 2
Advocate V
Advocate V

In my experience, this behaviour may be caused by localization of your device/OS/browser. I'm not entirely certain how the end result is determined, though. Even if you specify an explicit language code, it may be overridden or fall back to default. 

 

I think if you use a custom format that only uses numbers (like 'dd mmmm YYYY'), you can get a consistent behaviour.

 

Be wary when using the text options though. For example, in some of my apps I use 'Text(date, "[$-nl-NL]dddd dd mmmm yyyy")' to display a date; but I observed that if my browser language is set to English, it doesn't display the date in Dutch. And if I view it on my device, and the device language is set to English, it also displays the English text.

View solution in original post

This works. It feels a bit more like hard-coding the result, and shouldn't be necessary, but works. Thanks!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (51,546)