Announcements
How to get current year from predefined function or from textfield containing date . Also how to compare the date with current year? Please suggest some help.
Hi,
you may find what you need here :
https://powerapps.microsoft.com/en-us/tutorials/function-date-time/
https://powerapps.microsoft.com/en-us/tutorials/show-text-dates-times/
the function DateDiff can be used to compare 2 dates
Hi, in addtition to what MatthieuMegaly suggested you can use the string functions Left, Mid, Right.
Example here https://powerusers.microsoft.com/t5/PowerApps-Forum/Using-numbers-and-dates-from-SharePoint-lists/m-p/2268
Hello,
To get current date, you can you Now function
To compare date:
- I think you should convert the date text type from textfield (I assume) to date type by using Date function
- Then, use DateDiff function to compare 2 dates.
You can go here (Formular Reference) for more information.
You can use for example:
Text( yourDateVariable, "mm/dd/yyyy" ) = Text( Today(), "mm/dd/yyyy" )
Hello ,
I managed to compare two dates and show and hide a field if the time differenence is more than a year like this :
If(DateAdd(TargetItem.LastReview,365,Days) < Now(),UpdateContext({UpdateBTNgroup: true}),UpdateContext({UpdateBTNgroup: false}));
Thank you for the useful tip @Bassel
@Anonymous
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 382 Super User 2026 Season 2
Mohsin Ali 329
WarrenBelz 187 Most Valuable Professional