Please start any new threads on our new site at https://forums.sqlteam.com. 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)
 Conversion Error

Author  Topic 

ismail_issac
Starting Member

22 Posts

Posted - 2005-11-24 : 03:38:56
update finmast set LastPaidDate = JoiningDate - 1 where LastPaidDate = '1900/01/01'

give error ---

"The conversion from datetime data type to smalldatetime data type resulted in a smalldatetime overflow error."

Note:
JoiningDate is Datatime datatype
LastPaidDate is SmallDateTime Datatype

nr
SQLTeam MVY

12543 Posts

Posted - 2005-11-24 : 03:40:19
One of your JoiningDate -1 's won't fit in a smalldatetime maybe?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-24 : 03:49:49
The minimum date that can be stored at SmallDateTime is 1900/01/01
As LastPaidDate is of SmallDateTime datatype you get this error

Madhivanan

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

ismail_issac
Starting Member

22 Posts

Posted - 2005-11-24 : 03:53:59
Thank you for the replies
Go to Top of Page
   

- Advertisement -