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 Automate / BUG: Conversions of Da...
Power Automate
Suggested Answer

BUG: Conversions of Datetime -object partly uses system's date and time formatting instead of ISO

(0) ShareShare
ReportReport
Posted on by 2
Hi, 

I have a problem when using my system's regional formatting ("fi-FI") for date and time. When I add Datetime -object to Sharepoint or Dataverse connector, Power Automate Desktop should convert Datetime -object to proper ISO-format e.g. "2025-03-08T12:00:00Z" but instead it uses my system's regional formatting for the Time-field resulting in using "." instead of ":" e.g. "2025-03-08T12.00.00Z". This causes the Sharepoint and Dataverse connectors to fail with error Datetime cannot be converted to Datetimeoffset. This bug is present also when converting Datetime -object to text with "Convert datetime to text" using custom-format "yyyy-MM-ddTHH:mm:ssZ". Even though I have set the format to use ":" for time PAD uses "." which is visible in the sample.    
 
I have been able to circumvent this by changing my regional formatting to "en-US" which corrects the formatting error but this fix causes unnecessary problems in other software which use date and time.   
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at
    Hi,
     
    1. Use Format Date Time action with Invariant Culture override
    In PAD, use the Format Date Time action (instead of Convert to Text)
    Set the culture to Invariant (en-US) or "en-US" under advanced options
    Choose custom pattern: yyyy-MM-dd'T'HH:mm:ss'Z'
    This forces colon-based output irrespective of system locale.
    If the built‑in Format action doesn’t expose culture, you can:
     
     
    2. Use Run .NET Script action (C# or PowerShell)
    Insert a small .NET script to format the DateTime in invariant culture.
    Example C# snippet:

    DateTime dt = DateTime.Parse("%YourDatetimeVariable%");
    string iso = dt.ToString("yyyy-MM-dd'T'HH:mm:ss'Z'", CultureInfo.InvariantCulture);
    return iso;
    Capture the iso string and pass it to your connector.
     
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • Suggested answer
    AP-03081042-0 Profile Picture
    2 on at
    Hi,
     
    Thank you @Riyaz_riz11! This doesn't doesn't solve the problem because returning datetime from .NET script still resolves to the same conversion error when passing it to connector and returning string doesn't work either because Sharepoint and Dataverse connectors require datatype to be datetime for date and time fields.
     
    I reported the bug to Microsoft. Hopefully it gets resolved at some point. 
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Sounds like its more the problem with you sharepoint/dataverse settings. Sounds like the regional settings in those sites are "en-US" and so the datetime columns take in that format.

    https://support.office.com/client/results?authdataboundary=us&authtype=unknown&lcid=1033&locale=en-us&microsoftapplicationstelemetrydeviceid=f0077230-5d8b-4226-945b-064336a983d3&ns=SPOSTANDARD&omkt=en-us&version=16&helpid=WSSEndUser_CreateColumnPanelTitle

    Would it fix the problem if you just give the date time in the "en-US" format but change the time to be correct with Finlands time zone "fi-FI" (UTC+2)?

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard