Dear all,

How to filter the date using SETFILTER .Please explain with example .

Thanks in Advance!

With regards,



SETFILTER(Date,’%1’,TODAY); (Today) SETRANGE is better for this

SETFILTER(Date,’%1…%2’,0D,TODAY); (From startdate till TODAY);

SETFILTER(Date,’>%1|<%2,10112009D,1511200D) ; (From 11/11-2009 till 14/11-2009. Your date setup can be different the D=DATE

SETFILTER(Date,’%1&%2%%3’,10112009D,13112009D,15112009D); (only 10/11-2009,13/11-2009,15/11-2009)

  • whatever you can think of with "& = >< | " like in a normal filter

From/to dates can be set via Variables (Type date), CALCDATE etc. etc. etc. etc. . See C/side help

Click the Tools menu, click ‘C/SIDE Reference Guide’, and enter the keyword into the search tab. Most properties and C/AL keywords have very good explanations and examples.

The help in the NAV client should always be your first go to for syntax related questions. The examples are pretty good.