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 / Sharpoint Time Zone & App
Power Apps
Answered

Sharpoint Time Zone & App

(0) ShareShare
ReportReport
Posted on by 30

 

In my app, user can select time slots (9 AM, 10 AM, 11 AM, 7 PM, 8 PM) with a date picker provided to them and they can select that at their choice,  i am using this code to patch  the date to SharePoint.  

 Patch(SharepointList, Defaults(SharepointList),{ Date: DateTimeValue(DatePicker1.SelectedDate & " " & drpHour.Selected.Value}), 

 When I patch a date time (my local time zone) value into a SP list, the date time value  converted into  Eastern Time .

How can I fix this so it patches it over  the selected  date and Hours?

 

Users - anywhere in US

My SharePoint regional settings are EST

GET123_1-1639970462181.png

 

 

 

 

 

Categories:
I have the same question (0)
  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    DateAdd, DateDiff, and TimeZoneOffset functions in Power Apps - Power Apps | Microsoft Docs

     

    Look into the TimeZoneOffset function. You can use this to dateadd to the current utc time to get the modified time in relation to everything. Examples in the article. 

  • GET123 Profile Picture
    30 on at

    @cwebb365 Thank you  for sending me  the link . The problem is that I wanted to patch the selected value  to  SharePoint list ( just like , 12/19/2021 1:30 AM)  but when I patch it  the date time value  converted into  Eastern Time ( 12/19/2021 2:30 AM). setting to use Local vs. UTC is  not  solving my issue.

  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    I edited my original post, if you used e-mail to read and link, please go to post and check updated posting utilizing the timezone function instead. 

  • GET123 Profile Picture
    30 on at

    @cwebb365 ,  I have tried to use TimeZoneOffset functions  but I am not lucky to patch the selected value  to SharePoint list (the same DateTimevalue) . 

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @GET123 :

    The point is that your device and SharePoint Site are not in the same time zone.

    You can first use the TimeZoneOffset function to calculate the date offset between the user's current time and UTC time, and then add a 5-hour date offset to get the accurate date and time when uploading.Something like:

     Patch(
     SharepointList, 
     Defaults(SharepointList),
     {
     Date: DateAdd(
     DateAdd(
     DateTimeValue(DatePicker1.SelectedDate & " " & drpHour.Selected.Value),
     -TimeZoneOffset(),
     Minutes
     ),
     5,
     Hours
     )
     }
    )

     My tests——

    Site setting:

    vbofengmsft_2-1640068294515.png

    Patch:

     

    vbofengmsft_0-1640068243323.png

    Result:

    vbofengmsft_1-1640068275700.png

    Best Regards,

    Bof

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
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard