cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TMX_Consult
New Member

Convert date from Excel to string-date - Excel to Planner

I need to create a task in Planner by Power Automate using an Excel table, but an error message appears stating that the data type of the cell that has the task start date is in number format. I've made all the changes to Excel's date formats, but it always has the same error message.

 

TMX_Consult_0-1637758875328.png

 

Error: "OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of the 'Create_a_task' workflow operation of type 'OpenApiConnection' is not valid. Error Details: Input parameter 'body/startDateTime' must be of type 'String/date-time'. The runtime value '"44363"' to be converted does not have the expected format 'String/date-time'."

 

I've already changed to various date types in Excel and I've tried converting the timezone using Power Automate, but I still can't fix this error.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mahoneypat
Dual Super User
Dual Super User

If the field doesn't show in the Dynamic Content, you can still reference it inside the Apply to Each with syntax like this in your addDays function.

 

addDays('1899-12-30', item()?['Date Field'])

 

Pat

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Dual Super User
Dual Super User

You can use an expression like this convert the date integer into a date.  I hard-coded your integer below, but you can replace that part with your Excel value.

 

addDays('1899-12-30', 44363)

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Obrigado por sua resposta rápida. É difícil encontrar pessoas que dão conselhos como esse. Estou tentando adicionar a função addDays, mas a 'Data de início' não aparece na área de conteúdo dinâmico, ou seja, não sei como poder aplicar o que você indicou. O conteúdo dinâmico está vazio.

 

TMX_Consult_0-1637781179110.png

 

mahoneypat
Dual Super User
Dual Super User

If the field doesn't show in the Dynamic Content, you can still reference it inside the Apply to Each with syntax like this in your addDays function.

 

addDays('1899-12-30', item()?['Date Field'])

 

Pat

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,902)