SET @tableHTML =
@tableHTML +N'<tr><td colspan="2"> 1st email call T -3 = ' + DATEADD(day,-3, @Leaguedate) + '</td></tr>'
I'm getting this error message:
Conversion failed when converting date and/or time from character string.
SET @tableHTML =
@tableHTML +N'<tr><td colspan="2"> 1st email call T -3 = ' + DATEADD(day,-3, @Leaguedate) + '</td></tr>'
I'm getting this error message:
Conversion failed when converting date and/or time from character string.
You must convert the datetime
value to string (char
/varchar
/nchar
/nvarchar
).
The following statement:
SELECT 'string ' + DATEADD(day,-3, GETDATE()) +' another string'
Will result with:
Conversion failed when converting date and/or time from character string.
However this statement:
SELECT 'string '+ CONVERT(char(10), DATEADD(day,-3, GETDATE()), 103) +' another string'
Will result with:
string 06/03/2018 another string