Skip to main content
Answered

Filter List View by Month?

editSubscribe (0) ShareShare
ReportReport
Posted on by 522
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.  
Categories: