I have a query like below:
select
...
convert(VARCHAR(10), DATEADD(day,t.DAYNUMBER,t.START_DATE), 103) AS END_DATE
where END_DATE >= GETDATE()
It displays the following error:
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
t.DAYNUMBER comes from:
select max([day]) from TOUR_SPECIFIKA
where day is int. And t.START_DATE is date. I don't know why it shows nvarchar in error.