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 / Help writing SharePoin...
Power Automate
Unanswered

Help writing SharePoint Created date to SQL table

(0) ShareShare
ReportReport
Posted on 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

 

Categories:
I have the same question (0)
  • kriggo15 Profile Picture
    526 on at

    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.

     

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    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 at

    @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
    Microsoft Employee on at

    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.

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    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.

  • kriggo15 Profile Picture
    526 on at

    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')
  • e-rodrigues Profile Picture
    11 on at

    Hi @kriggo15 ,

     

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

     

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 Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard