Hi all

I got it to work. The winning code:

<CFSET timestampD = #createodbcdate(now())#>

  <!--- find based on date --->
  <CFQUERY DATASOURCE="#SESSION.dsn#" NAME="gm_drawings_bydate">
   SELECT
    *

   FROM
    uprr_drawings dwg

    WHERE
    dwg.mod_date between #timestampD# and #DateAdd("d",1,timestampD)#
  </CFQUERY>

Thanks to everyone to helped!!!!

* john *

JB Mentzer wrote:

> Hi all
>
> I'm trying to write a query to find records matching today's date. What
> I have is:
>
> <CFSET timestamp = #DateFormat(now(),"yyyy-mm-dd")#>
>
>   <!--- find based on date  --->
>   <CFQUERY DATASOURCE="#SESSION.dsn#" NAME="gm_drawings_bydate">
>    SELECT
>     *
>
>    FROM
>     uprr_drawings dwg
>
>     WHERE
>     dwg.mod_date = #timestamp#
>   </CFQUERY>
>
> >From the table, the data looks like this:
>
> 1/5/2001 22:42:09,
> 11/13/2000 07:47:16
> and so on ...
>
> All ideas appreciated!
>
> * john *
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to