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

x
?
Solved

Help! Convert SQL server date to yyyy mon dd

Posted on 2006-05-23
2
Medium Priority
?
1,142 Views
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!

thanks
RS
0
Comment
Question by:crich
2 Comments
 
LVL 75

Accepted Solution

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

Author Comment

by:crich
ID: 16745002
thanks
quick and accurate answer!
0

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