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 / Updating SQL with 'Dat...
Power Automate
Unanswered

Updating SQL with 'Date Actioned' is changing time to GMT

(0) ShareShare
ReportReport
Posted on by 5

Hello

 

We have a workflow with 3 steps,

  1. Get rows from SQL, this includes a column of 'now' which is a getdate() from SQL,
  2. send an email for each row of data returned from SQL
  3. Update a seperate SQL table to indicate the email has been sent

On the update action one of the fields it updates is 'Date Sent' which is supposed to be the date and time the flow ran, we currently use the 'now' field from the SQL get rows step to provide this data.

However, when this happens, flow is changing the date and time

For example, the input from our SQL row will be 12/10/2016 at 10:07, however when flow updates the SQL table it updates as 12/10/2016 at 20:37. I can see this happen inside flow, see below output from the flow run, the field in question is in red.

 

This looks to be a 10.5 hour offset, the timezone of our SQL server is Adelaide, currently GMT+10.5.

 

I require the date returned to SQL to be the same as the time input from the 'now' field without conversion, is this possible?

 

Inputs
  • Host
    { "api": { "runtimeUrl": "https://msmanaged-na.azure-apim.net/apim/sql" }, "connection": { "name": "/providers/Microsoft.PowerApps/apis/shared_sql/connections/a809224f348c4110990868e8f002d90e" } }
  • Method
    post
  • Path
    /datasets/default/tables/PSA_Flow_Contracting_DispatchedJobs/items
  • Authentication
    { "scheme": "Key", "parameter": "*sanitized*", "value": "*sanitized*", "type": "Raw" }
  • Body
    { "Service_Call_ID": "1609-0899", "Appointment": "0001", "Company_ID": "PSAGR", "Contractor_Dispatched": "DC", "Date_Sent": "2016-10-12T10:07:46.143Z", "PO_Number": "POG017419", "PO_Value": 500, "Sent": "Yes" }

Outputs

 

 

Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi Jak,

     

    Would you please be more specific about the detailed steps to create your flow? I will try to reproduce your issue according to your steps.

     

    Please help to collect the following information:

    1. Are you using on premise SQL server? What is the SQL server version?
    2. What is the trigger type of your first step in flow? And the following actions and conditions?

     

    Best regards,

    Mona Li

  • JakJak33 Profile Picture
    5 on at

    Hello

     

    We are using an on premise SQL server, SQL 2012 R2

    The trigger is a recurrance type of 1 minute.

    This then runs a 'Gew Rows' from SQL action, selecting from a view on our SQL server using an on-premise gateway, one of the columns in this view is a sql getdate() value, this returns the local time of our server, in the original post this is shown in the input as "Date_Sent": "2016-10-12T10:07:46.143Z"

    This then sends an email for each row

    Then the flow updates our SQL server, inserting a row for each record, including a column called 'Date Sent', however flow is showing in the output as "Date_Sent": "2016-10-12T20:37:46.143Z"

     

    Flow is expecting the input in UTC, and is converting the date on the output to my server's local time (i dont know how it knows what my server has set as local time).

    I dont know how it is doing this, but if i change my input from SQL to GETUTCDATE, it then runs the same conversion, effectively giving me the correct time stamp in the output.

     

    I dont know if this is expected behaviour of flow, but it is not documented anywhere.

     

    Thanks

     

     

    flow.capture.JPG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard