Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Convert the year 1900 to the year 2000

Author  Topic 

Ask SQLTeam Question

0 Posts

Posted - 2006-06-22 : 09:45:27
Minnie writes "How do you convert the year 1900 to 2000
and 1901 to 2001..etc"

In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-22 : 09:59:38
if it is a datetime data type

update table
set datecol = dateadd(year, 100, datecol)


Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 2006-06-22 : 10:01:01
Declare @d datetime
set @d='1900-01-01 10:10:10'
Select @d as [date], DateAdd(year,100,@d) as [date+100years]


Failing to plan is Planning to fail
Go to Top of Page

- Advertisement -