Reputation: 153
I am not able to convert the string to DATE format
select CONVERT(DATE, '8/17/2016', 103)
Conversion failed when converting date and/or time from character string.
what can we do to resolve this thanks
Upvotes: 0
Views: 99
Reputation: 2813
You can try with cast
also
select cast( '8/17/2016' as date)
Upvotes: 1
Reputation: 93704
Actually you don't need that style, It is the one causing the error. Just CAST/CONVERT
it to date. Try this
select CONVERT(DATE, '8/17/2016')
Upvotes: 1