cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

how to Insert Date values in SQL table from excel

Hi Mates,

we have date values in excel, we need to insert in to table 

i just created a compose for assign excel field , then next compose formatted like formateDateTime(outputs('compose')) but it throws error like can not format, 

if this is not right way ..!

i also tried with variable(initial : string)

then set variable i could not see any excel column at Dynamic content to map like excel column formateDateTime(exceldatefield,'mm/dd/yyyy')

 

Any help please 

1 ACCEPTED SOLUTION

Accepted Solutions

@muralikrishna12 ,

 

Please try the below expression:

if(greater(length(outputs('Compose')),0),addDays('12-30-1899',int(outputs('Compose')),'MM-dd-yyyy'),null)
 
Please let me know if you have any questions.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

5 REPLIES 5
Super User III
Super User III

Hi @muralikrishna12 

 

There are quite a lot of threads around this. Have a look at this

 

https://powerusers.microsoft.com/t5/Building-Flows/Excel-Table-cannot-convert-value-43875-4825115739...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Hi Mates,

working fine with when excel date field don`t have blank only, but what if we have row has blank value..?

addDays('1899-12-30',int(output('compose'),'yyyy-MM-dd')

i can convert and insert date values, when value is there in excel

what if excel has blank  it should should not stop, it should iterate with next values.

any help here if no value then it should blank, else update with excel value

 

Hi @muralikrishna12 

 

You could use empty, length, null checks in Power Automate using IF condition. Add an IF condition to check against the column or compose to determine whether its null or length > 0 etc.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

@muralikrishna12 ,

 

Please try the below expression:

if(greater(length(outputs('Compose')),0),addDays('12-30-1899',int(outputs('Compose')),'MM-dd-yyyy'),null)
 
Please let me know if you have any questions.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

Super User III
Super User III

Hi @muralikrishna12 

 

The expression you can use the one which we discussed yesterday as in one IF expression then again if you have more than one action steps to use better to use an IF condition as an action step.

 

If you have any questions let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

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

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (12,203)