Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Displaying date as dd/mmm/yyyy in sql server

Posted on 2005-03-15
Medium Priority
Last Modified: 2009-10-05
Is there a way in SQL server to set the default date format to dd/mmm/yyyy ?  
Question by:q2004
LVL 15

Accepted Solution

mcmonap earned 2000 total points
ID: 13543823
Hi q2004,

Dates are always stored the same in MS SQL server, YYYY-MM-DD HH:MM:SS.mss, you can change the output format with a select using the convert function, as below:

--this returns the datetime now (in default SQL format)
SELECT getdate()

--this returns the date formatted as you want it
SELECT CONVERT(VARCHAR(11),getdate(),113)

More info on convert can be found here:

Author Comment

ID: 13544976
That worked, thanks!


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, we’ll look at how to deploy ProxySQL.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

564 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