Solved

Format date in SQL

Posted on 2013-05-20
2
330 Views
Last Modified: 2013-05-20
Hello,

In Sql Server Management Studio, I have a date field. The data type is "date", and displays like this:

2004-09-03.

I just want it to show like this:

09/03/2004.

Can I just set the field properites up somehow to just record the data like that?

Thanks,
Joel
0
Comment
Question by:Genius123
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 260 total points
ID: 39182907
Put simply no. This is the format in which SQL Server stores Date column data, converting into the required format usually is done in the UI.
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 39183018
No is the correct answer, but:
>>"This is the format in which SQL Server stores Date column data"

Please don't think of date/time information as being stored "in a format" because they are not stored this way at all. In sql server date/time information is actually stored as 2 integers.

"formats" apply on top of date/time information - so that we humans can understand them.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question