Skip to main content

Notifications

Community site session details

Community site session details

Session Id : lzLbuZ+V0A7lVBU24M2l9O
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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard