I am trying to build button-click dates' VBA filter and seem to miss some logic here.
- How come the MONTH function in MONTH(DATE())-1 gives 0, but in DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) gives 12?
- In case of DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) the result is 2020/12/4. Why the MONTH subtraction affects the YEAR(DATE()) outcome as well?
- How come the MONTH function in MONTH(DATE())-1 gives 0, but in DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) gives 12?
- In case of DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) the result is 2020/12/4. Why the MONTH subtraction affects the YEAR(DATE()) outcome as well?
Last edited: