Goal:
Gain datatype date with year and month
Problem:
Need to help to convert varchar value into datatype date
Unfortunatley, no day is included in the data from column. Year and month only.
I tried converting into date without using day but I failed.
Varchar(10) column data
data
-------
1997-05
1984-12
1988-11
1984-10
1984-02
1984-01
1984-04
Assuming returning the first day of the given month is ok, you can use:
As others have suggested, you can’t have a date without a day.