0

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

2
  • 1
    Are you using MySQL or MS SQL Server? (Don't tag products not involved.) Commented Nov 22, 2016 at 12:59
  • just change 103 to 101 Commented Nov 22, 2016 at 13:06

4 Answers 4

1

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') 
Sign up to request clarification or add additional context in comments.

Comments

1

You can try with cast also

  select cast( '8/17/2016' as date) 

Comments

0
SELECT CONVERT(DATE, '8/17/2016', 101) 

1 Comment

please, consider adding an explanation, even a short one. Thanks!
0
SELECT convert(datetime, '8/17/2016', 111)

1 Comment

please consider adding an explanation, even a short one. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.