web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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 839
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.  
I have the same question (0)
  • Suggested answer
    Greg Kujawa Profile Picture
    839 on at
    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;
                }
  • Suggested answer
    YUN ZHU Profile Picture
    101,948 Super User 2026 Season 1 on at
    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,250 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,799 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,390

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans