Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Scenario: I have date range from 01.01.2023 to 07.02.2023.
On 07.02.2023 the previous Calendar week start from 30.01.2023 to 05.02.2023.
So, 30.01.2023 and 31.01.2023 belongs to previous month Jan. while 01.02.2023 to 05.02.2023 belongs to this month Feb. But the complete week is Calender Week 5.
Question: how to mark these two dates 30.01.2023 and 31.01.2023 -> Flag_PreviousMonthDays
and 01.02.2023 to 05.02.2023 Flag_ThisMonthDays?
Why would the week number impact which month the day belongs to? You can still test on Month(Today()) = Month(YourDate) regardless of weeks.
because I have to make filter for these days and then I have to analyze the data in tables according to the filter and send NPrinting Reports.
I understand the need to flag which month a day belongs to, I just don't understand why that would be impacted by the week number that day belongs to. If you compare the MonthName(Date) to MonthName(Today()) you would get the flag for this month, and AddMonths(Today(),-1) would get you the previous month.