Below is a snip of the code I use to build a pivot table. The RECEIVED field below is a date field which gives me records for every date between Jan 2021 and present day. This is good except for one thing. I don't want the last month unless it is complete. For example it now generates January data but the numbers don't meet expectations because the month has not yet finished. The question I have is: Is there a way to programmatically ask for all dates but only when the month has gone by? An example would be I only want to include Jan 2021's data when the current month is February. Many thanks.


Please Login or Register  to view this content.