Avatar of Fordraiders
Fordraiders
Flag for United States of America

asked on 

convert string to date

convert varchar date  string as date
year and month

Field value is   201812  

CAST(LEFT([CALMONTH],10) AS DATE),'yyyy-mm'

trying the above and not working ?

Thanks
fordraiders
Microsoft SQL ServerSQL

Avatar of undefined
Last Comment
Scott Pletcher

8/22/2022 - Mon