Hi,
1. Check the Date Format in PowerApps
Ensure that the date value is correctly formatted before submitting to SharePoint. Here’s a step-by-step approach:
a. Use the Date Function
Instead of directly manipulating the date, use PowerApps' Date() function to format the selected date correctly.
Date(Control.SelectedDate)
Then, submit this to SharePoint.
b. Update Date Field in SharePoint
Use the following formula to update the SharePoint list with the correctly formatted date:
Patch(
'Your SharePoint List',
LookUp('Your SharePoint List', ID = YourRecordID),
{
YourDateField: Date(Control.SelectedDate)
}
)
2. Ensure Correct Time Zone Handling
PowerApps uses UTC, and sometimes this could cause issues. You can try:
-
Adjusting the Time Zone Offset by using:
DateAdd(Date(Control.SelectedDate), TimeZoneOffset(), Minutes)
However, use this only if needed. If it shifts the date in the wrong direction, then avoid this method.
3. Alternative Approach
Another method is to avoid manual offset handling altogether and ensure the date is submitted directly without adjustments:
Date(Control.SelectedDate)
Then submit this value directly to SharePoint without any further transformations.