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
Super User
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
Super User
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
Super User
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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,245)