cancel
Showing results for
Did you mean:
New Member

## Highlighting a date

I am having a problem with highlighting the birthday months in a list of people. If their birthday is today it is highlighted as yellow, if (this month)Orange and people whose birthday is next month (OrangeRed). I am using the 'TemplateFill' section to  this with the following code

``If(Day(ThisItem.DOB) = Day(Today()) And Month(ThisItem.DOB) = Month(Today()),Yellow,Month(ThisItem.DOB) = Month(Today()),Orange ,Month(ThisItem.DOB) = Month(Today())+1,OrangeRed,White)``

This works EXCEPT during December where of course the next month should be 1 but calculates to 13.

Any ideas on how to fix it?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Change … +1 … to

… + If(Month(Today())=12, -11, 1) …

2 REPLIES 2
Anonymous
Not applicable

Change … +1 … to

… + If(Month(Today())=12, -11, 1) …

New Member

Simple when you know how!

Thank you!

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA