I'm having some trouble returning results from a query. I am using SQL server 2008 and the field (enterDate) is set as a dateTime in the table. When I run the query below, it does not return any records although there are records in the DB that should be returned. Any suggestions would be appreciated. EnterDate field in the db looks like this....
2013-01-03 09:51:09.613
<cfquery name="getBillable" datasource="#application.dsn#">
select *
from prospects
where email = '#form.email#'
and enterDate = #dateFormat(now(),'yyyy-mm-dd')#
</cfquery>
Thanks
Nick
ColdFusion Language
Last Comment
_agx_
8/22/2022 - Mon
becraig
why not set the date as a variable before the query then pass the variable into the query.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.