Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert Date

Posted on 2011-09-08
4
Medium Priority
?
240 Views
Last Modified: 2012-05-12
Experts-

I am using the following query to grab a column in my db and convert the date.  I would like the full month to display if possible.  Currently, what I have is only displaying three characters in the month along with the day and year.  Any help would be appreciated

 SELECT CONVERT(VARCHAR(12), nextBillingDate_c, 107) AS [Month DD, YYYY]
  FROM members

Thanks
0
Comment
Question by:nmarano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 17

Accepted Solution

by:
OriNetworks earned 2000 total points
ID: 36505053
SELECT DATENAME(MM, nextBillingDate_c) + ' ' + CAST(DAY(nextBillingDate_c) AS VARCHAR(2))+', ' +right(convert(varchar,nextBillingDate_c,101),4) AS [Month DD]
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 36505093
OR

select datename(MM,getdate()) +' ' + Convert(varchar,datepart(dd,getdate())) + ', ' + Convert(varchar,datepart(year,getdate()))
0
 
LVL 2

Author Closing Comment

by:nmarano
ID: 36505101
Awesome!  Thank you very much!
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 36505112
or to get it with the 2-digit day

SELECT datename(MM,getdate()) + ' ' + SUBSTRING(CONVERT(VARCHAR(8), GETDATE(), 3), 4, 2) +', ' + Convert(varchar,datepart(year,getdate()))
0

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

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

604 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