Hi,
I am using the following code to calculate a date 10 years later then [FPSubwayREopening]. How would I change the code so that it always finds the last day of the month?
Thanks!
Leesha
DateAdd("yyyy", 10, Me.FPSubwayREopening)
Calculate the last day of the month
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Calculate the last day of the month
Hi Leesha,
Try this:
DateAdd("yyyy",10,DateSerial(Year(Me.FPSubwayREopening),Month(Me.FPSubwayREopening)+1,0))
Try this:
DateAdd("yyyy",10,DateSerial(Year(Me.FPSubwayREopening),Month(Me.FPSubwayREopening)+1,0))
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- BronzeLounger
- Posts: 1487
- Joined: 05 Feb 2010, 22:25
Re: Calculate the last day of the month
Perfect!! Thanks so much!!
Leesha
Leesha
-
- Administrator
- Posts: 78439
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Calculate the last day of the month
Or
DateSerial(Year([FPSubwayREopening])+10,Month([FPSubwayREopening])+1,0)
DateSerial(Year([FPSubwayREopening])+10,Month([FPSubwayREopening])+1,0)
Best wishes,
Hans
Hans