Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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

 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1