I want to pull data from a data base according to date but my date field is a date/time field.
I tried the following but you cannot use date format in the query. There must be a simple way to do this but I can't see it.
<cfset todaydate = #CreateODBCDate(Now())#>
<cfset currentdate = #DateFormat(todaydate, "mm/dd/yyyy"
#>
<cfquery name="today" datasource="mycalendar">
select *
from EventsOneTime
where EventDate = #currentdate#
</cfquery>
I tried the following but you cannot use date format in the query. There must be a simple way to do this but I can't see it.
<cfset todaydate = #CreateODBCDate(Now())#>
<cfset currentdate = #DateFormat(todaydate, "mm/dd/yyyy"
<cfquery name="today" datasource="mycalendar">
select *
from EventsOneTime
where EventDate = #currentdate#
</cfquery>