How do I calculate the last days of a month?
For example, I have to create an IF statement that determines if the returned date lands on the last weekend of the month: then it needs to skip back to the last business day of the month. I cant put in something like 31 or 30 because if the 31st lands on a business day then it would be pointless and mess up my function.
Only in the last week of the month. I need to find whether the given date(without hardcoding) is on a weekend. If its on a weekend I need to find out if it lands on the last weekend of the month. If it lands on the last weekend of the month then I need to go back. Else, I need to go forward. This is not a duplicate.
All help is appreciated. Thank you.