Solved

Format date in SQL

Posted on 2013-05-20
2
329 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

821 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