KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a bunch of dates in varchar like this: 20080107 20090101 20100405 ... How do I convert them to a date format like this: 2008-01-07 2009-01-01 2010-04-05 I've tried using this: SELECT [FIRST_NAME] ,[MIDDLE_NAME] ,[LAST_NAME] ,cast([GRADUATION_DATE] as date) FROM mydb But get this message: Msg 241, Level 16, State 1, Line 2 Conversion failed when converting date and/or time from character string.
Tags (comma-separated)
Save Edits
Cancel