July 9, 200322 yr Ok, I just don't get this stuff. I have a date field - Inactive Date I want to create a calculation field (Deletion Date) that will add 30 years to Inactive Date. I can then use the Deletion Date in a start up script that will let me know when there are records that can be deleted. The only way I know how to do this is to add 365*30 to the Inactive Date, but that doesn't include Leap Years. I tried to just add 30 to the date, but it returns days that way and not years. Someone please end my torture. Thanks.
July 9, 200322 yr How does Date( Month( Inactive Date ), Day( Inactive Date ), Year( Inactive Date ) + 30 ) work for you?
July 9, 200322 yr Hi Raschelle, Use the following calculation for your deletion date field: Date( Month(Inactive Date), Day(Inactive Date) , Year(Inactive Date) + 30 ) This will add 30 years onto the date and leap years etc will be OK For example if the Inactive Date is 29/02/2000 (a valid date as 2000 was a leap year) Then the deletion date will be 01/03/2030 (as 2030 is not a leap year) Ed. Sorry Queue posted at the same time as you - it seems I'm making a bit of a habit of this at the moment - must speed up my typing skills!
July 9, 200322 yr Interestingly enough, that also gives 03/01/2000's Deletion Date as 03/01/2030. Is this a problem?
July 9, 200322 yr Author Thanks -Queue- and EddyB. That's just what I needed. Maybe someday I'll be posting answers instead of questions.
July 9, 200322 yr No problem Raschelle. The more you ask, the more you learn, the more you can answer others questions! I was the same when I joined the forum! We all still ask questions though, there's always more to learn! Ed.
Create an account or sign in to comment