BI_Dunce
asked on
Converting text to date
I have a table with dates that are stored as text:
021204
981112
000317
I want to convert the text to dates like this:
12/04/2002
11/12/1998
03/17/2000
I'm sure this should be quick and easy...I just can't seem to do it. Thanks!
021204
981112
000317
I want to convert the text to dates like this:
12/04/2002
11/12/1998
03/17/2000
I'm sure this should be quick and easy...I just can't seem to do it. Thanks!
example : SELECT CONVERT(DATETIME, CONVERT(CHAR(8), 20070824))
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
one question, do you want to convert them on the runtime or do you want to convert a column in your table?
ASKER
Both solutions worked, but pteranodon72's code was shorter and simpler. Thanks guys!! Much appreciated