someone has advice me this code...Set the SQLDate = 73603 ! todays date in long format.SelectDateADD(Day,((DateDiff(Day,'0001/01/01','1800/12/28')+SQLDATE)),'0001/01/01')This returns '2002-07-05' which is correct...
but...when I tried, this is my error:Declare @SQLDate Intset @SqlDate=73603Select DateADD(Day,((DateDiff(Day,'01/01/1900','01/01/1900')+@SqlDate)),'0001/01/01')Server: Msg 242, Level 16, State 3, Line 3The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.