Solved

Finding Last Date of the month

Posted on 2007-03-30
2
176 Views
Last Modified: 2010-04-23
I need to find the last day of the month of the next month of the variable date.  For instance if the date is 01/31/2007 I need it to come back 02/28/2007.  If the date is 12/31/2006 I need it to come back 01/31/2007.

0
Comment
Question by:mgmhicks
2 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 18825364
DateSerial(Year(StartDate), Month(StartDate) + 2, 0)

Kevin
0
 

Author Comment

by:mgmhicks
ID: 18825402
Thank you.  Straight and to the point.

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question