web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : Irl3+QpX7fwKOJrdQuXUXt
Power Automate - Building Flows
Unanswered

Help writing SharePoint Created date to SQL table

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2020 00:59:11 by 526

I need some assistance with a flow I'm creating. The flow is supposed to take the items in a SharePoint list on a given frequency, write them to our SQL DB, then delete the SP records.

 

My flow is failing when trying to write the SP Created date to the Created (datetime DataType) field in my SQL table. I've tried modifying a solution I found to a different problem here but am still having issues.

I tried the below code but got the error in the screenshots.

 

convertToUtc(outputs('Get_items')?['Created'], 'GMT Standard Time')

flow1.pngflow2.png

 

I have the same question (0)
  • e-rodrigues Profile Picture
    11 on 02 Oct 2020 at 13:15:21
    Re: Help writing SharePoint Created date to SQL table

    Hi @kriggo15 ,

     

    An option would be to apply this solution from another post I've found here - which uses the "Convert time zone Action" 

     

  • kriggo15 Profile Picture
    526 on 02 Oct 2020 at 12:34:40
    Re: Help writing SharePoint Created date to SQL table

    While probably not the best way to solve the problem, I did find a workaround:

    formatDateTime(items('Apply_to_each')?['Created'],'yyyy-MM-ddThh:mm:ssZ')
  • v-alzhan-msft Profile Picture
    on 02 Oct 2020 at 02:41:34
    Re: Help writing SharePoint Created date to SQL table

    Hi @kriggo15 ,

     

    Does your issue still exists?

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-alzhan-msft Profile Picture
    on 28 Sep 2020 at 06:32:12
    Re: Help writing SharePoint Created date to SQL table

    Hi @kriggo15 ,

     

    Please share the configuration of the flow and the expression that you use.

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • kriggo15 Profile Picture
    526 on 22 Sep 2020 at 12:09:44
    Re: Help writing SharePoint Created date to SQL table

    @v-alzhan-msft, unfortunately that resulted in an error seen below.

    InvalidTemplate. Unable to process template language expressions in action 'Insert_row_(V2)' inputs at line '1' and column '22920': 'The template language function 'convertToUtc' expects its second parameter to be a time zone matching the time zone indicated by the timestamp. The provided value '(UTC+00:00) Dublin, Edinburgh, Lisbon, London' is not valid or does not match the timestamp '2020-09-22T12:07:09.0000000Z'. Please see https://aka.ms/logicexpressions#ConvertToUtc for usage details.'.

  • v-alzhan-msft Profile Picture
    on 22 Sep 2020 at 03:31:04
    Re: Help writing SharePoint Created date to SQL table

    Hi @kriggo15 ,

     

    Please take a try with expression below:

    convertToUtc(items('Apply_to_each')?['Created'], 'GMT Standard Time')

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • kriggo15 Profile Picture
    526 on 21 Sep 2020 at 12:27:53
    Re: Help writing SharePoint Created date to SQL table

    I've tried the following code but am still receiving errors.

    1. convertToUtc(outputs('Get_items')?['body/Created'], 'GMT Standard Time')
    2. convertToUtc(outputs('Get_items')?['value/Created'], 'GMT Standard Time')
    3. convertToUtc('Get_items'()?['Created'], 'GMT Standard Time')
    
    Error: One or more fields provided is of type 'Null', a different type is expected.

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2