Solved

Format date in SQL

Posted on 2013-05-20
2
325 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
Comment Utility
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
Comment Utility
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now