cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.
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.
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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 52 members 4,319 guests
Please welcome our newest community members: