I got a dataset in SQL Server Management Studio.
The data looks like the following
month Year
-------------
Feb 2016
Jan 2015
I want to create a numeric date using 01 as dd. I tried
CAST('01-'+ month +'-'+ year AS DATE)
also
CONVERT(DATETIME, '01-'+ month +'-'+ year, 106) AS
Both of them cause this error:
Conversion failed when converting date and/or time from character string.
Can anyone teach me how to covert the string into numeric datetime/date please.