If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Get the month from a date field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-16-04, 09:45
Lukelrc Lukelrc is offline
Registered User
 
Join Date: Dec 2003
Location: Oxford, England
Posts: 38
Get the month from a date field

Hi,

There's probably a really simple asnwer to this but i cant seem to find it.

I have a date field and i want to display just the month in words.

At the moment i have

DatePart(m,PressreleaseDate) AS stMonth

but that returns a value of 1-12, i want January to December

can anyone help

Regards,

Luke
Reply With Quote
  #2 (permalink)  
Old 04-16-04, 10:19
Lukelrc Lukelrc is offline
Registered User
 
Join Date: Dec 2003
Location: Oxford, England
Posts: 38
Re: Get the month from a date field

Nevermind i've worked it ut

Datename(month,([PressreleaseDate])) as 'MonthName'

Easy!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On