Avatar of nmarano
nmarano

asked on 

Convert Date

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
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
OriNetworks
ASKER CERTIFIED SOLUTION
Avatar of OriNetworks
OriNetworks

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of OriNetworks
OriNetworks

OR

select datename(MM,getdate()) +' ' + Convert(varchar,datepart(dd,getdate())) + ', ' + Convert(varchar,datepart(year,getdate()))
Avatar of nmarano
nmarano

ASKER

Awesome!  Thank you very much!
Avatar of OriNetworks
OriNetworks

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()))
Microsoft SQL Server 2008
Microsoft SQL Server 2008

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the Always On technologies and support for unstructured data types.

50K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo