![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Feb 20 2008 5:19 AM | Permanent Link |
"Harry de Boer" | LS,
-What's the correct statement to update the year portion of a date column? -Does this raize an error with leap years? Regards, Harry |
Wed, Feb 20 2008 9:57 AM | Permanent Link |
"Rita" | Try something like
update TABLENAME set [DATEFIELD] = CDate( Format$([DATEFIELD], "MM/DD/") & "2003" ) where Year([DATEFIELD]) = 1903 "Harry de Boer" <harry@staaf.nl> wrote in message news:3E204A92-C0D6-4B99-AE09-CACA181D3585@news.elevatesoft.com... > LS, > > -What's the correct statement to update the year portion of a date column? > -Does this raize an error with leap years? > > Regards, Harry > > |
Wed, Feb 20 2008 11:03 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Nah - its them bloody INTERVAL's again
Harry you need something like update table set _date =_date + interval 1 year Tried it for a leap year and it moved 2004-02-29 to 2005-03-01 Roy Lambert |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |