Skip to main content

Notifications

Power Automate - Using Connectors
Answered

GetOnUpdatedItems_V2 returns different date and time format compared to GetOnUpdatedItems_V2 when triggered from same SQL Table

(0) ShareShare
ReportReport
Posted on by 2

Hi!

I am using Power Automate to create and update items in a Sharepoint list when a row is added or changed in a SQL database.

GetOnNewItems_V2 gives following outptus for date:
"2023-01-20T00:00:00"

GetOnUpdatedItems_V2 gives following outputs for same date:

"2023-01-22T00:00:00Z"
GetOnNewItems_V2 gives following outputs for a time field:
 
"18:40:00"

 GetOnUpdatedItems_V2 gives following outputs for same time filed:

"PT7H"

 It seems like the format is not changed in the SQL server when the time or date is updated.

 

Anyone knows what can cause this?

 

Thanks in advance.

  • Verified answer
    nitishsh91 Profile Picture
    nitishsh91 200 on at
    Re: GetOnUpdatedItems_V2 returns different date and time format compared to GetOnUpdatedItems_V2 when triggered from same SQL Table

    Hi @SSlemmen 

     

    The different outputs you're seeing for the date and time fields in your Power Automate flow are likely due to differences in the data type and format of the fields in the SQL database and SharePoint list.

    When the data is being retrieved from the SQL server, it may be in a specific format and data type (e.g. datetime or time) that is not recognized as the same format in SharePoint. The "PT7H" in the output for the time field is an ISO 8601 duration format, which could indicate that the field in the SQL server is of the "time" data type, whereas SharePoint may be expecting a different format.

    To resolve this issue, you can try to modify your flow to convert the date and time fields to the correct format and data type before updating the SharePoint list. For example, you can use the "Convert time zone" action to convert the date and time fields to a specific time zone, or use the "Format date/time" action to convert them to a specific format.

    Another solution would be to modify the SQL Server table and make sure the date and time fields are in the format that SharePoint is expecting.

    Additionally, it could be that the SQL server is in a different time zone, you should check this and convert the time zone accordingly.

    In order to troubleshoot this issue further, it would be helpful to see the specific schema of the SQL table and SharePoint list, as well as the actions in your Power Automate flow.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics