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 / Cannot convert a primi...
Power Automate
Unanswered

Cannot convert a primitive valueCannot convert a primitive value to the expected type 'Edm.DateTime'

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

I am experiencing an issue with the flow I am building, and I would appreciate the community's help in resolving it. Here are some statements about the flow and its functions:

 

  1. The flow retrieves data from an Excel table.
  2. The data is then sent to a SharePoint list using an HTTP request.
  3. The SharePoint list contains different data types, including classic, date format (yyyy-MM-dd), number, and single line of text.

 

The issue occurs at a particular step, which is shown in the attached picture.  I have tried using various formulas, but none of them have resolved the issue.

 

if(empty(items('Apply_to_each_3')?['StartDate']), null, formatDateTime(addDays('1899-12-30', int(items('Apply_to_each_3')?['StartDate'])), 'yyyy-MM-dd'))

if(empty(items('Apply_to_each_3')?['StartDate']), '', formatDateTime(addDays('1899-12-30', int(items('Apply_to_each_3')?['StartDate'])), 'yyyy-MM-dd'))

if(empty(items('Apply_to_each_3')?['StartDate']), '1900-01-01', formatDateTime(addDays('1899-12-30', int(items('Apply_to_each_3')?['StartDate'])), 'yyyy-MM-dd'))

 


AlexDuma_0-1682540326032.png

 

Every time I am getting this error:

Cannot convert a primitive value to the expected type 'Edm.DateTime'. See the inner exception for more details.
clientRequestId: 1f1d6fb3-8075-400a-b372-111b2755f481
serviceRequestId: f912ada0-b074-6000-7f2a-27f4091d0660

I am new to this forum and I am hoping to receive assistance from the experts here.

Thank you in advance for your support and guidance.

 

Categories:
I have the same question (0)
  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @AlexDuma ,

     

    It seems you put quotes '' around the formula. You could remove the quotes '' and try.

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • AlexDuma Profile Picture
    2 on at

    Hi @v-zhoqian-msft 

    well, after removing single quotes I get this error:

    Invalid JSON. An unexpected comma was found in scope 'Property'. A comma is only valid between properties of an object or between elements of an array.
    clientRequestId: a748a79b-c197-4bc0-8df1-f4e595585451
    serviceRequestId: a252ada0-d061-6000-804c-0f1a9c8ee72d

    thank you

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
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard