web
You’re offline. This is a read only version of the page.
close
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 583
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
    583 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
    95,729 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,362

#2
YUN ZHU Profile Picture

YUN ZHU 867 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans