473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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

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.

3 2192
NeoPa
32,556 Expert Mod 16PB
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
Thank you very much. That worked.
Jan 24 '18 #3
NeoPa
32,556 Expert Mod 16PB
Always a pleasure :-)
Jan 25 '18 #4

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

Similar topics

1
by: Jason | last post by:
For some reason, most but not all reports printing from an access application our client is using will not print any images on the reports or forms. One report will print the image and data...
1
by: Rinee | last post by:
Hi, I have a database of a bunch of contractors who have signed a safety agreement with us, their contact info, their insurance info, etc. Each was assigned an ID number as the main key. Each...
2
by: Sara | last post by:
I have followed instructions on the http://allenbrowne.com/tips.html for limiting a report to a date range. At the bottom there is a note that says You will end up using this form for all sorts...
5
by: AdrianE | last post by:
I have a database where a record has a start date and an end date and is linked to an employee. Ho do I create a report that will show each employee and gaps between the employees next record...
3
by: bhavu10 | last post by:
hi i have created a form forreport with today, week month & year CMD Button but i think i wrote the code wrong for month and also it shows me only records for this year whewe as i have 2006...
2
by: deepikashalini | last post by:
hi, Im storing Issue date in database. Issuedate stored as varchar. and then compare to Passing string date('03/06/2008') what is query to compare storing varchar date to passing string...
7
by: kkshansid | last post by:
i want to display it in date/ month/ year format <td><?php echo date("d/m/y",($row)); ?></td> output 01/01/70 <td><?php echo $row; ?></td> output 1977-08-09
3
by: Stoic | last post by:
Hi everyone, I have an Access database with a table and a date field, and I also have a report for this table. I am getting error from my code on getting the exact date range I need to be generated...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.