Skip to main content
Inspiring
July 1, 2008
Question

Date question

  • July 1, 2008
  • 2 replies
  • 235 views
I have pulldown that I populate dynamically. I use this query :
<cfquery name="qry" datasource="db">
select distinct
substring(convert(varchar,EmailDate,101), 1, 2) as month
from test_norsMaster
where eMailDate is not NULL
order by month
</cfquery>

I gives me the month as 01, 02, etc. How can I convert the month extract to be January, February, etc ?

Thanks
    This topic has been closed for replies.

    2 replies

    Inspiring
    July 3, 2008
    for cf: MonthAsString(month_number)
    Inspiring
    July 1, 2008
    You can often answer questions like this yourself by checking your ColdFusion and Database documentation first :-) . Since you are working with dates, check the category for Date Functions. Two possibilities are MonthAsString (CF) and DateName (SQL Server)
    http://livedocs.adobe.com/coldfusion/7/htmldocs/00000589.htm#134018
    http://msdn.microsoft.com/en-us/library/ms174395.aspx