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 Apps
Suggested Answer

Time zone error

(2) ShareShare
ReportReport
Posted on by 4
Hello everyone, I’m new using Power Apps. I have an app that generates an error if the user changes the timezone. The SharePoint list is in UTC +01:00. I applied the following in the patch DateAdd(Now(), -TimeZoneOffset(),TimeUnit.Minutes) and DateAdd(dpInvoice.SelectedDate, - TimeZoneOffset() the label to display the date Text(DateAdd(ThisItem.Date_and_time_Divergence, TimeZoneOffset(), TimeUnit.Minutes),"[$-en-US]mm/dd/yyyy hh:mm AM/PM")
. I would like to know if this is the best option.
 
Errors 
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,126 on at
    The issue occurs because timezone conversion is being applied both when saving and displaying the data, which leads to double conversion and invalid
     
    DateTime values.
     
    In Power Apps with SharePoint, timezone handling is automatic—SharePoint stores data in UTC and Power Apps converts it to the user’s local time.
     
    The correct approach is to save the date using Now() (or the DatePicker value) without applying TimeZoneOffset, and display it directly using Text(). Manual
     
    timezone conversion should only be used in specific scenarios involving external systems, and must be applied consistently either during save or display—not
     
    both.
     
    Best practice (recommended approach)
    Rule 1 — Store UTC (ONLY once)
    When saving to SharePoint:
    • Now()
    If you MUST normalize:
    • DateAdd(Now(), TimeZoneOffset(), TimeUnit.Minutes)
    BUT usually unnecessary.
    Rule 2 — Let Power Apps handle display
    For label:
    • Text(ThisItem.Date_and_time_Divergence, "[$-en-US]mm/dd/yyyy hh:mm AM/PM")
     
  • Suggested answer
    Haque Profile Picture
    2,532 on at
     
    SharePoint date/time fields are stored in UTC internally, regardless of the site regional settings. The display in SharePoint UI adjusts for the site or user time zone, but the raw data is UTC.

    Let's fix it from both sides:

    When patching a date/time (e.g., Now() or a selected date): 
    DateAdd(Now(), -TimeZoneOffset(Now()), TimeUnit.Minutes)
    
    or for a selected date/time: 
    DateAdd(dpInvoice.SelectedDate, -TimeZoneOffset(dpInvoice.SelectedDate), TimeUnit.Minutes)
    
    When displaying a date/time from SharePoint:
    Text(
        DateAdd(ThisItem.Date_and_time_Divergence, TimeZoneOffset(ThisItem.Date_and_time_Divergence), TimeUnit.Minutes),
        "[$-en-US]mm/dd/yyyy hh:mm AM/PM"
    )
    
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     
  • Suggested answer
    Valantis Profile Picture
    4,895 on at
     
    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/

    💼 LinkedIn

    ▶️ YouTube

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 936

#2
11manish Profile Picture

11manish 628

#3
Valantis Profile Picture

Valantis 604

Last 30 days Overall leaderboard