Topic: Append query n - years and days to date
Good afternoon! Help please with request. There is a table. It is necessary to add to column Time1 to 10 years and 10 days, and then to compare to column Time 2. Tried to write request
from Table 1
Where Time1 between ' 2017-09-17 0:00:00 AM ' and ' 2017-09-17 0:00:00 AM'
and dateadd (year, 10, Time1)> =Time2
But the error - The conversion of a varchar data type to a datatime data type resulted in an out-of-range value is deduced.