The error "string was not recognized as valid datetime, unknown word starting at index 1" means the value coming from SharePoint is arriving as a text string rather than a datetime value. DateAdd can't process it until it's converted.
The fix is to wrap your SharePoint date column in DateTimeValue() before passing it to DateAdd:
For displaying the date:
Text(DateAdd(DateTimeValue(ThisItem.Date_and_time_Divergence), TimeZoneOffset(), TimeUnit.Minutes), "[$-en-US]mm/dd/yyyy hh:mm AM/PM")
For Patch with Now():
DateAdd(Now(), -TimeZoneOffset(), TimeUnit.Minutes)
This one is fine as-is since Now() already returns a proper datetime.
For Patch with the date picker:
DateAdd(dpInvoice.SelectedDate, -TimeZoneOffset(), TimeUnit.Minutes)
DatePicker returns a date not datetime, so if you need time precision wrap it: DateAdd(DateTimeValue(Text(dpInvoice.SelectedDate, "mm/dd/yyyy")), -TimeZoneOffset(), TimeUnit.Minutes)
On the approach overall: using TimeZoneOffset() to adjust for UTC is correct for SharePoint which stores dates in UTC. The pattern you have is the standard way to handle this in Power Apps.
Best regards,
Valantis
✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.
❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).
🏷️ For follow-ups @Valantis.
📝 https://valantisond365.com/