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


Help! Convert SQL server date to yyyy mon dd

Posted on 2006-05-23
Medium Priority
Last Modified: 2008-03-17
Hi all,
 I am looking for some t-sql that will convert dates held within my sql server from dd/mm/yyyy to yyyy mon dd i.e. 2006 May 23

I am familier with the convert function but cannot find any reference to this format on books online, and inputting a custom made date function such as 'yyyy mon dd' into convert where the style number goes does not work.

Any ideas, please help!

Question by:crich
LVL 75

Accepted Solution

Aneesh Retnakaran earned 1000 total points
ID: 16744394
SELECT CAST(YEAR(GETDATE())as varchar)+' ' + CONVERT(varchar(6),getdate(),109)

Author Comment

ID: 16745002
quick and accurate answer!

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Suggested Courses

581 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