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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding end of month & payment dates

Status
Not open for further replies.

Mightyginger

Programmer
Feb 27, 2003
131
US
Instead of having to lopp through until the month changes is there a quick way to return the last date of the month?

Also, just to ask your guys opinion about the best way of doing this - I'm trying to work out the last payment date and next payment date of a bond. So I know what today is and I know when the bond matures and how many coupons it pays a year.

So at the moment what I do is take year(today) and month(maturity) and day(maturity) to give me that payment date this year and then loop back using a tempdate until tempdate<dateserial(year(today),month(maturity),day(maturity)). From that I then add on the number of month until the next coupon date and do this until nextcoupondate>today so that is the next coupon and the date &quot;i-1&quot; is the last coupon date. Hope thats clear. Do you think this is the &quot;best&quot; i.e. quickest way of doing this or any or suggestions.

Thanks again guys,


Neil.
 
Check out my FAQ on Excel's Date Functions: faq68-4037

I think it could help! [thumbsup2]



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Nice thinking - like some of your tricks. Will keep that handy. Thanks Mike.


Neil.
 
Just the FAQ's ma'am! ;-)

Glad I could help!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top