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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps SharePoint l...
Power Apps
Unanswered

PowerApps SharePoint list form with datetime field

(0) ShareShare
ReportReport
Posted on by 8,531 Most Valuable Professional

We have built a PowerApps SharePoint list form with many datetime fields. What i noticed is the date time selected in Power Apps form differs from what is getting saved to SharePoint. The SharePoint regional timezone settings uses Eastern Standard Time(EST), and i would like the user from any location to access the Power Apps form, select the date/time assuming it is EST time, so that form and SharePoint date and time matches. Is there a way out to do this in PowerApps?

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Yes, there is a way to ensure that the selected date and time in Power Apps matches the date and time saved in SharePoint, considering the SharePoint regional timezone settings.

    In Power Apps, you can use the TimeZoneOffset function to adjust the selected date and time to match the desired timezone (Eastern Standard Time in this case) before saving it to SharePoint.

    Here's an example of how you can use the TimeZoneOffset function:

    1. In your Power Apps form, when the user selects a date and time in a DateTime picker control, you can apply the TimeZoneOffset function to adjust the value to the desired timezone.

      For example, if you have a DateTime picker control named DateTimePicker1, you can use the following formula to adjust the value:

     

    DateAdd(DateTimePicker1.Selected, -TimeZoneOffset(DateTimePicker1.Selected), Minutes)

     

     

    1. This formula subtracts the offset of the selected date and time based on the user's current timezone, so that the value is converted to the desired timezone (Eastern Standard Time).

    2. When saving the adjusted date and time to the SharePoint list, you can use the adjusted value in the Patch or Update function.

      For example, if you have a SharePoint list called MyList with a datetime column named MyDateTimeColumn, you can use the following formula to save the adjusted value:

     

    Patch(MyList, Defaults(MyList), { MyDateTimeColumn: DateAdd(DateTimePicker1.Selected, -TimeZoneOffset(DateTimePicker1.Selected), Minutes) })

     

    1. This formula uses the Patch function to update the MyDateTimeColumn with the adjusted date and time value.

    By applying the TimeZoneOffset function to adjust the selected date and time in Power Apps before saving it to SharePoint, you can ensure that the form and SharePoint date and time values match, regardless of the user's location.

    Please note that this approach assumes that the regional timezone settings in SharePoint remain consistent (Eastern Standard Time in this case) and that the users are aware that they are selecting a date and time in that timezone.

    Let me know if you have any further questions!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard