By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

conversion from varchar

P: 13
I have a column named entrydate in my table as datatype varchar as following
mm/dd/yyyy . How can I convert the column to datetime format..

I tried the following but i got an error


select convert(datetime,entrydate,1) from timeentry


I got the following error

::Conversion failed when converting datetime from character string.
Feb 24 '09 #1
Share this Question
Share on Google+
1 Reply


P: 9
Try CAST instead of CONVERT


SELECT CAST(entrydate AS datetime) FROM timeentry
Feb 24 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.