Skip to main content
Community site session details

Community site session details

Session Id : 74RuL2/GHYzBnlIVr/QhSm
Power Apps - Building Power Apps
Unanswered

Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

Like (0) ShareShare
ReportReport
Posted on 5 Apr 2018 22:04:43 by 53

I have a Visitor Management Solution PowerApp which checks users in and out of an office.

 

On button click following the check-in process, I am running a Patch() command to take the current time via Now() and store this value as a timestamp to a list in SharePoint Online.

 

Now() shows the correct local time in PowerApps, but once this value is pushed to SharePoint, the value is two hours in the past. I'm in CST. What's the recommendation here? Is this simply a bug?

 

This is not a "your time-zone is wrong in SharePoint" issue.

 

I can do something like DateAdd(Now(), -2, Hours) in order to get the data pushed to SharePoint correctly but then I'll have to make the same correction/conversion everywhere in my app where this date-time is returned and shown. This approach would also not support situations where multiple time-zones are in play which will be common for me moving forward.

Categories:
  • dallinp12 Profile Picture
    2 on 25 Jan 2024 at 19:19:17
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    Check your sharepoint regional settings.  I had the same issue and my end-user's sharepoint site was set to Pacific Time, while we're actually on Eastern Time.  Changing this fixed my issue

    dallinp12_0-1706210259109.png

     

  • Community Power Platform Member Profile Picture
    on 11 Oct 2019 at 05:15:42
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    think you have to use utcnow() so it adapts to the end-user's timezone. Could be wrong though.

  • Community Power Platform Member Profile Picture
    on 09 Aug 2019 at 16:36:04
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    Hi All,

     

    I found a similar thread that discusses timestamps in SharePoint. Please review the following and let me know if it's helpful 

     

    https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Write-Date-Time-to-Sharepoint/td-p/159479

     

    @Anonymous 

  • Community Power Platform Member Profile Picture
    on 26 Jun 2019 at 13:07:01
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    Bump

  • Community Power Platform Member Profile Picture
    on 28 May 2019 at 13:20:30
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    Any luck? I have the same issue

  • patrickabel Profile Picture
    53 on 15 Apr 2018 at 22:28:20
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    bump, any assistance here would be appreciated. 

  • patrickabel Profile Picture
    53 on 09 Apr 2018 at 02:57:03
    Re: Now() is correct in PowerApps but wrong once pushed to SharePoint via Patch()

    Just checking back in, can anyone help on this issue?

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete