likecoding Posted November 27, 2017 Share Posted November 27, 2017 Hello, How to return true if today plus 45 days is inside the last 45 of the year? And return false if today plus 45 days is NOT inside the last 45 day of the year? todayDateIs = Date todayPlus45Day = DateAdd("d",45,todayDateIs) if todayPlus45Day inside the last 45 days of the year then return ture elseif todayPlus45Day inside the last 45 days of the year then return false end if I am not sure how to compare if todayPlus45Day is inside the last 45 days of the year? Thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 28, 2017 Share Posted November 28, 2017 Check the month and date. If the month is 12 and the date is 31, then 45 days from now is the last day of the year. Otherwise, check the year. If the year isn't the current year then it's sometime within the last 45 days. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now