Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Filter List View by Month?

(0) ShareShare
ReportReport
Posted on by 385
So I added a couple of extended date fields off of the Contact record. One for birthday and another for anniversary. When looking at the Contact List I would like to filter them against these field values. But only for the month. Using the date filters in the BC 365 SaaS web UI I don't want to use a range. Since that would evaluate the entire recordset in between. For example, if I wanted all Contacts with December birthdays, defining a date filter of 12/1/1753..12/31/9999 would list all Contacts with any defined birthdays.
 
Now looking to create something in AL code to accomplish this. I can picture how I would employ the logic. Using something like:
 
BirthMonth := Date2DMY(Birthday,2);
if BirthMonth = 12...blah blah blah
 
Can anyone suggest the best way that I could accomplish this? Searching around I can't seem to find an example targeted toward this exact logic.  
  • Suggested answer
    YUN ZHU Profile Picture
    85,883 Super User 2025 Season 1 on at
    Filter List View by Month?
    Hi, just add some info.
    Using the Date Method to retrieve only the Day, Month, and Year Data in Queries [Group by Year-month]
     
     
    Thanks.
    ZHU
  • Suggested answer
    Greg Kujawa Profile Picture
    385 on at
    Filter List View by Month?
    Disregard, as I delved into the AL query and am using that as a basis for what I need. Like this.
     
    column(BirthMonth; Birthday)
                {
                    Caption = 'Birth Month';
                    Method = Month;
                }

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.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans