cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JosWhite
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
MrNappa
Kudo Collector
Kudo Collector

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
MrNappa
Kudo Collector
Kudo Collector

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.

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

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,265)