Hi,
I have a situation where I need to write a query that will always and consistently add ONE YEAR to a datetime field.
For example, if renewal date is 2006-10-23, then I need to be able to add one year to that date so that it is exactly 2007-10-23. However, I realize that just adding 365 to the field won't always result in accurate addition. Case in point: adding 365 to 2008-01-01 will get you 2008-12-31. Not what I want.
Is there a way to code this correctly?? I'm sure it involves the use of some date function, but I can't think of it at the moment...
Thanks
I have a situation where I need to write a query that will always and consistently add ONE YEAR to a datetime field.
For example, if renewal date is 2006-10-23, then I need to be able to add one year to that date so that it is exactly 2007-10-23. However, I realize that just adding 365 to the field won't always result in accurate addition. Case in point: adding 365 to 2008-01-01 will get you 2008-12-31. Not what I want.
Is there a way to code this correctly?? I'm sure it involves the use of some date function, but I can't think of it at the moment...
Thanks