Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Month End date

Status
Not open for further replies.

AccessVB

MIS
Jun 23, 2002
82
US
Hi Everyone,

Is there a way to make sure using dateadd or some other function to return a month end date. To be more specific, I am trying to breakdown a contract into smaller periods based on interst payment frequency and dateadd is giving results that are slightly off. For a contract that goes from 12/31/04 to 12/31/05, i need to create the following records-

12/31/04 - 3/31/05
3/31/05 - 6/30/05
6/30/05 - 9/30/05
9/30/05 - 12/31/05

I am ok for the first 3 lines, but for the last line dateadd("m",3) returns

12/31/04 - 3/31/05
3/31/05 - 6/30/05
6/30/05 - 9/30/05
9/30/05 - 12/30/05

as it is adding 3 months to 9/30/05. Any tips would be greatly appreciated..

Thanks.


 


Hi,

DateSerial(Year, Month+1, 0)

returns the last day of Month.

Skip,
[sub]
[glasses] [red]Be Advised![/red] Coeds studying ancient Egyptian plumbing, might be known as...
Pharaoh Faucet Majors [tongue][/sub]
 
Hi,
This will also do it:

=DateSerial(Year(Date()),1+Month(Date()),0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top