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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Date problem

(0) ShareShare
ReportReport
Posted on by 18
Hello, I am facing an issue with a gallery that displays a column containing dates. When I open the file in Excel, the date appears correctly. However, when the data is shown in the gallery, it seems to display one day earlier. Does anyone know why this might be happening? Any help or insights would be greatly appreciated.
 
       
Categories:
  • WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at
    Hi @BP-06122300-0​​​​​​​
    Apart from Excel and Dates in Power Apps not being "good friends", I suspect this is a Time Zone issue, so firstly try
    DateAdd(
       ThisItem.YourDateField, 
       -TimeZoneOffset(), 
       Minutes
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

  • BP-06122300-0 Profile Picture
    18 on at
    It doesn't work, it keeps showing a day early 
    When I try with a label it show me this

    It's like it's reading 3 hours early
  • BP-06122300-0 Profile Picture
    18 on at
    I tried it with positive TimeZoneOffset() and it works. Thanks!
     
    I have an issue with a button in my code. When it writes to the table, it adds the data to the next day instead of the current day. I believe the problem is related, but I'm not sure how to fix it
     
    Set(selectedYear; DropdownYear.Selected.Value);;
    Set(selectedMonth; DropdownMonth.Selected.Value);;
    Set(selectedDay; DropdownDay.Selected.Value);;
    Set(hoursValue; Input_Hours.Text);;
    Set(Activities; Input_Activity.Text);;
    
    Set(formattedDate;DateTimeValue(selectedDay & "/" & selectedMonth & "/" & selectedYear));;
    
    
    If(
        IsBlank(selectedYear) || IsBlank(selectedMonth) || IsBlank(selectedDay) || IsBlank(Activities) ||IsBlank(hoursValue);
        Notify("Please fill in all required fields before proceeding.";NotificationType.Error;5000);
        Switch(
            Input_User.Text;
            "bperez";
            If(
                IsBlank(
                    LookUp(
                        bperez;
                        DateValue(Text(Date)) = DateValue(Text(formattedDate));
                        Proposal
                    )
                );
                UpdateIf(
                    brunoperez;
                    DateValue(Text(Date)) = DateValue(Text(formattedDate));
                    {
                        Activity: Activities;
                        Hours: Value(hoursValue)
                    }
                )
            );
            "crivera";
            If(
                IsBlank(
                    LookUp(
                        crivera;
                        DateValue(Text(Date)) = DateValue(Text(formattedDate));
                        Proposal
                    )
                );
                UpdateIf(
                    conirivera;
                    DateValue(Text(Date)) = DateValue(Text(formattedDate));
                    {
                        Activity: Activities;
                        Hours: Value(hoursValue)
                    }
                )
            )
        )
    );;
    
     
  • WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at
    Yes - same issue. Excel is problematic with dates as they can only be stored in Text (as in your case) or effectively a number. If you bring it all into SharePoint, all of this will go away as the Date field also allows for the Time Zone of the server and local device.
    You are going to need to add the TimeZoneOffset to every query reference of the data in your Table.
    Also (depending on where you are based), TimeZoneOffset is a negative value, so you should need to reverse it to add to the field value.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

  • Verified answer
    WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard