date in MMDDCCYY format

Posted on 2014-04-29
Last Modified: 2014-04-29
How to convert a datetime field to MMDDCCYY in a select statement
Question by:Star79
  • 2
LVL 40

Accepted Solution

Kyle Abrahams earned 350 total points
ID: 40030346
SELECT replace(convert(VARCHAR, getdate(), 101) , '/', '') myDate
LVL 22

Expert Comment

ID: 40030350
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 150 total points
ID: 40030370
In addition to Kyle's correct answer, SQL expert PortletPaul wrote an article on SQL Server Date Styles (formats) using CONVERT() that is an excellent cheat sheet on converting dates.
LVL 22

Expert Comment

ID: 40030377
That  article is sweet !
thanks for sharing

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Update Query - What's wrong with this. 18 20
how to check the index used by a MS SQL queries or SP 7 39
SQL Exceptions 3 39
SQL Statement to Update Email Domain 2 23
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

18 Experts available now in Live!

Get 1:1 Help Now