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

convert varchar(10) = '2014-04-06' to mmddyyyy format.

P: 1
Other than using substring('2014-04-06',6,2) + ... Is there a better way to convert the varchar column value to MMDDYYYY format ?
Apr 7 '14 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 12,430
I wouldn't say it's better but you could use the convert function with style 101 and use a replace to remove the forward slashes.
Apr 7 '14 #2

Expert 100+
P: 1,043
Expand|Select|Wrap|Line Numbers
  1. select convert(datetime,'2013-04-06')
more readings: here
Apr 8 '14 #3

Post your reply

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