Skip to main content
May 15, 2007
Question

CHARTS

  • May 15, 2007
  • 2 replies
  • 309 views
Hi
i have a chart i want to produce, i have a table with the column "date" which is a datestamp, what i want is to display months along the bottom ie Jan Feb March etc

i need my where clause to be ....

where MONTH(Date) = session.month,

the session.month is formated as January but the MONTH(Date) is numerical, how can i change the format of numerical date to the format of january?
This topic has been closed for replies.

2 replies

Inspiring
May 16, 2007
Ah, I misunderstood your question. MonthAsString() is a coldfusion function, not a SQL function. What DB are you using? Depending on your database, you will probably have similar functions available to you - take a look in the SQL documentation for you database (look for Date Functions). Otherwise, you could convert session.Daily into its corresponding numeric value with a quick and dirty <cfif>/<cfelseif>/<cfelse> block.
Inspiring
May 15, 2007
Check out the CF date functions in the documentation. I think you'll find MonthAsString() is what you're looking for.
May 15, 2007
ok thanks, i have already tried that using

WHERE MonthAsString(Month(Date))=#session.Daily#

but i get the error
General error: FUNCTION database.MonthAsString does not exist