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 - Desktop ...
Power Apps
Answered

Date Format - Desktop & Mobile Issues

(0) ShareShare
ReportReport
Posted on by 226 Moderator
I have been chasing a problem and I am hoping for some help. About 30% of our users are using French iOS and date range filtering does not work.

I have tried everything that I could think of to write into different formats, force formats to "en-US" nothing seems to work.

For example, on my Windows desktop I see something like "11/6/2024" on the French iOS we see "6 novembre 2024. So now when I try to filter a gallery of events I get nothing in return on the French iOS devices.

This is the code where I trigger my date range (for example Today, This Week, etc):
//Set base variables for Filter Dates
UpdateContext({_startDate: DateValue(Text(Today(), "mm/dd/yyyy"), "en-US")});
UpdateContext({_endDate: DateValue(Text(Today() + 1, "mm/dd/yyyy"), "en-US")});
This is a sample of what I am doing on the Gallery Items:
With(
    {
        startDate: DateValue(Text(_startDate, "mm/dd/yyyy", "en-US")),
        endDate: DateValue(Text(_endDate, "mm/dd/yyyy", "en-US"))
    },
    SortByColumns(
        Filter(
            If( // Checks to see Local Briefings or Region Briefings are checked
                _galleryFilter,
                tempbyUser,
                temp
            ),
            Created >= DateValue(Text(_startDate, "mm/dd/yyyy", "en-US")),
            Created < DateValue(Text(_endDate, "mm/dd/yyyy", "en-US"))        ),
    _sortColumn, _sortDirection
    )
)
 
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
    can u try this:
    UpdateContext({_startDate: Text(Today(), "yyyy-mm-dd")});
    UpdateContext({_endDate: Text(Today() + 1, "yyyy-mm-dd")});
    
    With(
        {
            startDate: DateValue(_startDate),
            endDate: DateValue(_endDate)
        },
        SortByColumns(
            Filter(
                If(
                    _galleryFilter,
                    tempbyUser,
                    temp
                ),
                Created >= startDate,
                Created < endDate
            ),
            _sortColumn, _sortDirection
        )
    )
    
     
     
    if my answer helped please mark as verified answer,
     
     
    cheers
  • Hack-7 Profile Picture
    226 Moderator on at
    That does partially work, but here is a new one.

    On the iOS device when I do this:
    UpdateContext({_startDate1: Text(Today(), "mm-dd-yyyy")});
    UpdateContext({_endDate1: Text(Today() + 1, "mm-dd-yyyy")});
    I see this in a Text Field:
    11-06-2024 // 11-07-2024 (which are the date ranges - _startDate1 // _endDate1)

    Now when I do this:
    UpdateContext({_startDate1: Text(Today(), "mm-dd-yyyy")});
    ​​​​​​​UpdateContext({_endDate1: Text(DateAdd(_startDate1, 7, TimeUnit.Days), "mm-dd-yyyy")});
    The results are this:
    11-06-2024 // 06-18-2024

    Or course when I look on the desktop it displays as expected.  11-06-2024 // 11-07-2024 or  11-06-2024 // 11-13-2024

    This is the Item code on the Gallery
    With(
        {
            StartDate: DateValue(_startDate1),
            EndDate: DateValue(_endDate1)
        },
        SortByColumns(
            Filter(
                tempBrefings,
                Created>= StartDate, 
                Created< EndDate
            )
            ,
            _sortColumn, _sortDirection
        )
    )

  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at
    Hi  Hack-7 
     
    Assuming that the Created column is of data type date/datetime, the best thing to do is to work with date objects rather than convert to US date. 

    The syntax would look like this.
     
    //Set base variables for Filter Dates
    UpdateContext({_startDate: Today()});
    UpdateContext({_endDate: DateAdd(Today(), 1, TimeUnit.Days)});
    The Gallery Items would look like this.
        SortByColumns(
            Filter(
                If( // Checks to see Local Briefings or Region Briefings are checked
                    _galleryFilter,
                    tempbyUser,
                    temp
                ),
                Created >= _startDate,
                Created < _endDate
            ),
            _sortColumn, 
            _sortDirection
        )
    
  • Verified answer
    Hack-7 Profile Picture
    226 Moderator on at
    Coming back to this... Here are findings.  Still not seeing the gallery filters on the French iOS devices.
     
    Button - Today
    //Set base variables for Filter Dates
    UpdateContext({_startDate: DateValue(Today())});
    UpdateContext({_endDate: DateAdd(Today(), 1, TimeUnit.Days)});
    Button - Yesteday
    //Set base variables for Filter Dates
    UpdateContext({_startDate: DateAdd(Today(), -1, TimeUnit.Days)});
    UpdateContext({_endDate: DateValue(Today())});
    
    Gallery Code has this
    SortByColumns(
        Filter(
            temp,
            Created >= _startDate,
            Created < _endDate
        ),
        _sortColumn, 
        _sortDirection
    )
     
  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at
    Hi Hack7
     
    The images you posted aren't showing for me, but it sounds like the data type of the Created column in your temp/tempByUser/tempBriefing are in text format.  
     
    Can you confirm that's the case? If so, what date format are you using for the Created column? Is it US format mm/dd/yyyy? 
     
    If that's the case, this is the formula you can use for the gallery. The formula for the today and yesterday buttons would remain the same.
     
    SortByColumns(
        Filter(
            temp,
            DateValue(Created,"en-US") >= _startDate,
            DateValue(Created,"en-US") < _endDate
        ),
        _sortColumn, 
        _sortDirection
    )
     
     
  • Hack-7 Profile Picture
    226 Moderator on at
    In the end the code helped me the most
    //Set base variables for Filter Dates
    UpdateContext({_startDate: Today()});
    UpdateContext({_endDate: DateAdd(Today(), 1, TimeUnit.Days)});
    It was the basis of finding the errors and resolving the problems that we chased for 4 weeks.
    Cheers

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard