i’m trying to convert following varchar date to datetime format but it doesn’t work
select Convert(datetime, '2010-04-14',103)+10 AS DocDueDate
from tblActionHeader AH
i’m getting the error
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
You are using a date style for the format dd/mm/yyyy, use the style 120 instead: