cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ibrahimkhalil
Level: Powered On

Compare dates

Hi,

 

i have a list of items, thier details are saved in an excel sheet in Documents in sharepoint.

 

what i want is that to compare the dates of each of the items in that excel sheet with the current date, if it matchs it will send email.

 

i built the flow but i have an issue that condition is always false becasue the date is read as value from excel not as date format. for example 2019-04-24  will be taken as 43579 which will fail the condition.

 

any help please ..

 

thanks,

Ibrahim 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Compare dates

Hi @Ibrahimkhalil 

You need to set your excel column to be a string, not a date ... I chatted this though before on the below thread.

https://powerusers.microsoft.com/t5/Building-Flows/excel-to-google-calendar-flow/m-p/255841

Capture-496.png

 

 

If you have found my post helpful, please mark thumbs up.

 

Any other questions, just ask.

 

Thanks, Alan


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

Proud to be a Flownaut!


View solution in original post

Community Support Team
Community Support Team

Re: Compare dates

Hi @Ibrahimkhalil ,

 

As Alan mentioned, he has provided a good solution, please take a try.

 

In addition, please also consider the following method to solve this problem, don’t need to change the type of the fields in Excel table.

  • Use addDays() function to get the date represented by the corresponding field string value.

Expression reference:

addDays('1899-12-30',int(item()['Date']),'yyyy-MM-dd')

Image reference:20.PNG

 

19.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Compare dates

Both of the Excel Online (Business) and Excel Online (OneDrive) connectors will always return the date column as plain integers instead of the date/time format. The original Excel Connector could return the date and time, but that connector is now deprecated.

Due to the reduced functionality and strict limitations (especially file lockout times) of the Excel Online connectors, Flow experts tend to agree that you should avoid using the Excel Online connectors at all cost. Instead, you could create and/or update a SharePoint list via the Excel document, and then pull the date/time from the SharePoint list data.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User
Super User

Re: Compare dates

Hi @Ibrahimkhalil 

You need to set your excel column to be a string, not a date ... I chatted this though before on the below thread.

https://powerusers.microsoft.com/t5/Building-Flows/excel-to-google-calendar-flow/m-p/255841

Capture-496.png

 

 

If you have found my post helpful, please mark thumbs up.

 

Any other questions, just ask.

 

Thanks, Alan


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

Proud to be a Flownaut!


View solution in original post

Community Support Team
Community Support Team

Re: Compare dates

Hi @Ibrahimkhalil ,

 

As Alan mentioned, he has provided a good solution, please take a try.

 

In addition, please also consider the following method to solve this problem, don’t need to change the type of the fields in Excel table.

  • Use addDays() function to get the date represented by the corresponding field string value.

Expression reference:

addDays('1899-12-30',int(item()['Date']),'yyyy-MM-dd')

Image reference:20.PNG

 

19.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Ibrahimkhalil
Level: Powered On

Re: Compare dates

HI Alan,  this works for me, many thanks for your help.

 

BR,

Ibrahim 

Ibrahimkhalil
Level: Powered On

Re: Compare dates

Hi  @v-bacao-msft,

 

 

Super User
Super User

Re: Compare dates

Hi @Ibrahimkhalil .

Thank you for taking the time to feedback your 2 solutions and for using thumbs up!

It really does help the community when they search in the furure.

 

I am very glad you have a wroking solution.

 

Best wishes, Alan.

 

Happy Flowing!


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

Proud to be a Flownaut!


Ibrahimkhalil
Level: Powered On

Re: Compare dates

Hi Alan,

 

Hope this message finds you well.

 

i created an approval, and i want the approver to provide extra information (must be added) so that it will go to next phase approval.

 

Thanks in advance.

 

BR,

Ibrahim

Ibrahimkhalil
Level: Powered On

Re: Compare dates

Hi @AlanPs1 ,

 

Hope this message finds you well. i created an approval, and i want the approver to provide extra information (must be added) so that it will go to next phase approval.

 

Thanks in advance.

 

BR,

Ibrahim

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,268)