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

Convert Date Value in Excel To Date Value in Power Automate

Hello,

 

how to convert date value in my excel to date value in power automate, here is my date value in excel 

Capture321.PNG

and here is my value in power automate using date value in my excel 

Capture2.1.PNG

Capture2.3.PNG

how to convert it ? thank you 

 

9 REPLIES 9
Super User II
Super User II

Hi @AdhamFH 

 

The number represented is the number of days since 1-1-1900. To get a valid date you can do it in one formula, but I'll split into 2 so that it's easier to understand:

 

Get the start date:

formatDateTime('1-1-1900','dd-MM-yyyy')

Get the current date:

addDays(outputs('Compose'),sub(<Excel NUMBER>,1))

 

You'll add the excel number to the start date. You need to decrease by one since its the elapsed number of days, so if you only add the days, you'll get tomorrow instead of today.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

@manuelstgomes  thank you for your response, but i still dont get it, could you please show it using power automate?

Sure here you go.

 

2020-03-11 14_38_49-Window.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

What if i use excel connector to get my date value ? @manuelstgomes

@manuelstgomes actually i use excel connector in compose and i got that '43901' value how to convert it because i want to make condition between my date which stored in my excel and today's date. how should i do to reach that

Hi @AdhamFH 

 

Also a strategy. I wrote an article a while ago that used Excel's connector to parse information provided from Power Automate to get the next business day, but the strategy is exactly the same.

https://manueltgomes.com/microsoft/powerautomate/find-next-business-day/

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

HI @AdhamFH 

 

Were you able to solve this issue?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

I will give you a thumbs up for sure as this fixed the exact same issue.   

 

 

Tasks excel table deadline column.PNG

 

I had to add in addtional step since PA treats me Deadline date as string, so I made it an integer

 

Get excel date as a valid date.png

 

Thereafter I can compare my deadline date with today as it is in the correct format.  Some peeps might say that is a lot of steps just to compare two dates .... 🙄

 

ticks(outputs('Get_Deadline_Date'))

 

 

 

 

Hi @westerdaled 

 

I agree with your step-by-step approach. In each step you can see what value is converted and it's easier to debug.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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 (6,730)