Link to home
Start Free TrialLog in
Avatar of rye004
rye004Flag for United States of America

asked on

Need SQL help to convert nvarchar(255) to datetime.

I hope this posting finds everyone doing well.

I received a SQL table with a nvarchar(255) column with dates as strings, below are a few examples.

Sun Aug 19 19:01:17 +0000 2012
Thu Oct 13 21:35:22 +0000 2011
Fri Apr 13 03:24:38 +0000 2012
Mon Nov 28 03:05:30 +0000 2011
Wed May 27 01:30:07 +0000 2009
Fri Jul 22 00:27:20 +0000 2011

I wanted to see if anyone knew how to convert these to datetime.  I have been trying the convert method with no luck.  I figure I would ask on here before I started writing my own SQL function to do this.

Many thanks!
SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rye004

ASKER

Thank you so much for your fast response.  These both worked perfectly.