Just talking off the top of my head, but D1 falls after D2. Could that be
the problem?
Russel
============================================================
Russel Madere, Jr. Senior Web Developer
ICQ: 5446158 http://www.TurboSquid.com
Some days you eat the bear; some days the bear eats you.
============================================================
> -----Original Message-----
> From: Erik S. Nachbahr [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 01:30
> To: CF-Talk
> Subject: Query Using Date - Please HELP!!
>
>
>
>
>
> Greetings All!
>
> I am crazy, what am I doing wrong here. I want to Run a query on
> an access date/time field. I want to generate the dates to query with
> myself
>
> This code Works........
>
> SELECT
> Sum(ToyotaExtra_Daily) AS ToyotaExtraTotal,
> Sum(Extended_Daily) AS ExtendedTotal
> FROM SFI
> Where Date between {d '2001-01-26'} and {d '2001-01-25'}
>
> However, what I want to do is something like this:
>
> Create two dates based on user form data
>
> <cfset D1 = "{d '#userYear#-#userMonth#-#userDay#'}">
> <cfset D2 = "{d '#userYear#-#userMonth#-01'}">
>
> And then invoke them in my query:
>
> SELECT
> Sum(ToyotaExtra_Daily) AS ToyotaExtraTotal,
> Sum(Extended_Daily) AS ExtendedTotal
> FROM SFI
> Where Date between #D1# and #D2#
>
> I get an error when I try the second method!
>
> Please cc [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> as I get the list in digest
> thanks!
>
> ��������f���+r�q��H��}����o�˱�m趟�> ����*r��w�Dz'm�
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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