Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Converting "5/22/2012 12:00:00 AM" to a DateTime

Are there any built in ways to make this conversion?  Or any code I can grab and make into an extension method?

Thanks!
Avatar of YZlat
YZlat
Flag of United States of America image

use CAST or CONVERT functions
CONVERT(datetime, '5/22/2012 12:00:00 AM', 120)
Sorry, use Convert.ToDateTime("5/22/2012 12:00:00 AM");
ASKER CERTIFIED SOLUTION
Avatar of YZlat
YZlat
Flag of United States of America 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
Avatar of curiouswebster

ASKER

Thanks!