How do I Query A Date and have it output in numerical order?
I have a calendar that stores the date of an event in the column calendardate as mm/dd/yyyy. Additionally, the day is sotered in the column calenderday as Monday. I am trying to query the access database and have the events listed by the day starting on Monday. I have tried variuos forms of query, but the closest I have come to any form of order is:
<cfquery name="getEvent" datasource="#dsn#">
select CalendarDay,calendardate, eventname
from venues
group by CalendarDay,calendardate, eventname
</cfquery>
Unfortunately, it listes the days alphabetically instead of numerically, ie: Friday, Monday, Saturday, etc. I have tried:
<cfquery name="getEvent" datasource="#dsn#">
select CalendarDay,calendardate, eventname
from venues
order by dayofweek(calendardate)
</cfquery>
I get the followinf error: "Undefined function 'dayofweek' in expression"
How do I query my database so the ouput lists the days starting with Monday?
I have run out of solutions.
