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

To change Date Format in Sql

P: 92
Hi,

Can anyone suggest me, how to change the Date format in SQL. By Default it Creates datatype datetime as '0000-00-00 00:00:00'. But i want to change d format as Month/Date/Year. while Creating the table.

How can i do this............

Thanks in Advance.
May 23 '08 #1
Share this Question
Share on Google+
3 Replies


code green
Expert 100+
P: 1,726
Why are you worried about what the date looks like in the database?
If it is to function as a DATETIME field then don't start fiddling.
However. when you extract the date within a SELECT statement then you can start formatting.
The CONVERT function is useful.
Have a look at this article
link
May 23 '08 #2

ck9663
Expert 2.5K+
P: 2,878
I agree.

And if it's for display purposes, handle it on your front-end.

-- CK
May 23 '08 #3

P: 92
I agree.

And if it's for display purposes, handle it on your front-end.

-- CK
Thanks for ur suggestion,

I got d answer. It's working properly.
May 24 '08 #4

Post your reply

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