Thanks guys I think I figured it out with your help.

The problem is the time thing. I eliminated the time portion and just
inserted the date without any time and it works perfectly....

Jeff

----- Original Message ----- 
From: "Jeff - Development" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, August 04, 2003 4:38 AM
Subject: Help with ACCESS and DATES.. Oh The Horror!!


> I've got a strange one, its pretty strange to me, maybe not to one of
you...
>
> I insert a date for a record using this set statement....
> <cfset form.record_modifieddate=createodbcdate(now())>
>
> and inside the database the record looks like this
>
> 8/1/2003 2:47:29 AM
>
> There are about 12 entries on this particular date, various times. Easy
> enough. Now I go to query based on a particular date:
>
> --------
> <cfset today = Createodbcdatetime("8/1/2003")>
>
> <cfquery name="q_todaytotal" datasource="contacts.mdb">
>
> SELECT      *
> FROM        contacts
> WHERE       record_modifieddate = #today#
> </cfquery>
> <cfset total_calls = #q_todaytotal.recordcount#>
> <cfoutput>#total_calls#</cfoutput> Total Calls. <br>
> ---------
> I get 0 for results when I should be getting 12. This query doesn't work
> when I use createodbcdate instead of createodbcdatetime. I still get 0.
>
> Heres the weird part... When I query a SPECIFIC time...
>
> ---------
> <cfset today = Createodbcdatetime("8/1/2003  2:47:29")>
>
> <cfquery name="q_todaytotal" datasource="contacts.mdb">
>
> SELECT      *
> FROM        contacts
> WHERE       record_modifieddate = #today#
> </cfquery>
> <cfset total_calls = #q_todaytotal.recordcount#>
> <cfoutput>#total_calls#</cfoutput> Total Calls. <br>
> ----------
>
> I get a result of 1. How the heck do I query for an entire day, getting
all
> 12 records on that date???? There has to be something REAL simple thats
> wrong with my date query..
>
> Thanks..
> Jeff
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to