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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,132)