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 Platform Community / Forums / Power Apps / Patch date and time wi...
Power Apps
Answered

Patch date and time with timezone difference

(0) ShareShare
ReportReport
Posted on by 7

Hello there, I hope you can help me out here, because i'm completely lost. I have an app in powerapps where i patch a datetime picker to a date time column in sharepoint. It patches ok but there is a 4 hours difference between the hour i submitted in the app and the hour that was patched in the sharepoint. Same thing happens with the submission:Now() part of the code. What am I doing wrong?
If you need it , the code for the OnSelect property of the submit button is this: 

Patch(
    'TestList2',
    Gallery3.Selected,
    {
        Status: {Value: "Pending"},
           'Timestamp':DateValue2_1.Value +
                         Time(Value(HourValue2_1.Selected.Value), Value(MinuteValue2_1.Selected.Value),0),
        Submission:Now()
        }
 
Thanks in advance!
Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Maurizio1 ,

     

    Firstly, let me explain why you encountered this problem.

    The point is timezone. The time in your App is the local time. When the time is saved to SharePoint, it will be converted according to the time zone set by your SharePoint Site. So the time you get is different from the time in the App.

    Secondly, I have two solutions :

    Solution1:Modify the formula

    Submission:DateAdd(Now(),X,Hours),

    Solution2:Change the TimeZone of your SharePoint Site

    Site contents>Site Settings>Site Administration>Regional settings

    vbofengmsft_0-1715215538758.jpeg

     

    vbofengmsft_1-1715215538759.jpeg

     

    Best Regards,

    Bof

  • Maurizio1 Profile Picture
    7 on at

    You rock!! Thanks so much, it worked perfectly!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard