I have an access database that has a column of dates that I would like to have converted to a number for the day. I can use the DayOfWeek(CalendarDate) in the cfoutput and get the numerical string of the date. However, If I try to use the DayOfWeek(CalendarDate)in a query, I get the following error:
Undefined function 'DayOfWeek' in expression. Below is the query I am trying to use:
<cfquery name="getEvent" datasource="#dsn#"> select * from venues order by DayOfWeek(CalendarDate), starttime asc </cfquery>
How can I can I convert the CalendarDate to a number of 1-7 and order by the number so my output will list the days in proper order?