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

Compare date in PowerApps

Hi all,

 

I have a field in SharePoint List name "Expired Date".

 

In PowerApps, how can I compare date today() with "Expired Date" in SharePoint List on specific item (Visitor Name)?

 

For example:

I want to compare Brinta's Expired Date <= today(). How can I used LookUp function to retrieve 2 column for visitor name and expired date? How can I know Brinta's ID so that I will get her expired date using that ID and start to compare the date with today?

 

powerapps.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Compare date in PowerApps

HI @shabila97 ,

Could you please share a bit more about your scenario?

Do you want to compare Brinta's Expired Date <= today() within your app?

Further, could you please share a bit more about the Visitor Name column? Is it a Single text column or Person type column?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

If the Visitor Name column is a Single line text column in your SP list, please take a try with the following formula:

LookUp('YourSPList', 'Visitor Name' = "Brinta", 'Expired Date') <= Today()

If the Visitor Name column is a Person type column in your SP list, please take a try with the following formula:

LookUp('YourSPList', 'Visitor Name'.DisplayName = "Brinta", 'Expired Date') <= Today()

Note: It is not necessary to get the Item ID value for a specific item in your SP list for retrieving the 'Expired Date' column value. You just need to LookUp the specific item record via a unique column, e.g. "Visitor Name" that you mentioned.

 

More details about the LookUp function in PowerApps, please check the following article:

LookUp function

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Compare date in PowerApps

HI @shabila97 ,

Could you please share a bit more about your scenario?

Do you want to compare Brinta's Expired Date <= today() within your app?

Further, could you please share a bit more about the Visitor Name column? Is it a Single text column or Person type column?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

If the Visitor Name column is a Single line text column in your SP list, please take a try with the following formula:

LookUp('YourSPList', 'Visitor Name' = "Brinta", 'Expired Date') <= Today()

If the Visitor Name column is a Person type column in your SP list, please take a try with the following formula:

LookUp('YourSPList', 'Visitor Name'.DisplayName = "Brinta", 'Expired Date') <= Today()

Note: It is not necessary to get the Item ID value for a specific item in your SP list for retrieving the 'Expired Date' column value. You just need to LookUp the specific item record via a unique column, e.g. "Visitor Name" that you mentioned.

 

More details about the LookUp function in PowerApps, please check the following article:

LookUp function

 

Best regards,

Community Support Team _ Kris Dai
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

Highlighted
shabila97
Level: Powered On

Re: Compare date in PowerApps

LookUp('YourSPList', 'Visitor Name' = "Brinta", 'Expired Date') <= Today()

This one works well for me!!

 

Thank you @v-xida-msft  

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,212)