By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

Trying to do Report that will show the due date of 15 month and the end of the mon

P: 2
I'm trying to run a report and I would like it to show the date 15 month later and at the end of the month.

Example; date trained 12/14/17 in the report it should show next training date 12/31/18.

This is the formula I have now which gets me to the 15 months but not to the end of the month.

=DateAdd("m",+15,[due date])
Jan 17 '18 #1

✓ answered by NeoPa

So, Rod, it appears you already have an answer to one of the two questions so let's focus on getting the date of the end of the month.

Simply put, this involves going back one day from the first day of the following month. Yes?

Expand|Select|Wrap|Line Numbers
  1. X = DateAdd("d",-1,DateAdd("m",1,CDate(Format([Due Date],"yyyy\-m\-1"))))
This uses the SQL standard date format of yyyy-m-d but you could also use the other SQL standard of m/d/yyyy if you prefer.

Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,411
So, Rod, it appears you already have an answer to one of the two questions so let's focus on getting the date of the end of the month.

Simply put, this involves going back one day from the first day of the following month. Yes?

Expand|Select|Wrap|Line Numbers
  1. X = DateAdd("d",-1,DateAdd("m",1,CDate(Format([Due Date],"yyyy\-m\-1"))))
This uses the SQL standard date format of yyyy-m-d but you could also use the other SQL standard of m/d/yyyy if you prefer.
Jan 17 '18 #2

P: 2
Thank you very much. That worked.
Jan 24 '18 #3

NeoPa
Expert Mod 15k+
P: 31,411
Always a pleasure :-)
Jan 25 '18 #4

Post your reply

Sign in to post your reply or Sign up for a free account.