Jeff you might want to consider storing only the "date" in your your record_modified 
field and then create another field to store the time.  When you add both the time and 
date to the same field, I think you violate one of the rules of database 
Normalization.  


Dwayne Cole, MS in MIS, MBA
Florida A&M University
Certified Advanced ColdFusion Developer
850-591-0212
 
"It can truly be said that nothing happens until there is vision. But it is equally 
true that a vision with no underlying sense of purpose, no calling, is just a good 
idea - all "sound and fury, signifying nothing."  The Fifth Discipline - Peter Senge



---------- Original Message ----------------------------------
From: "Jeff - Development" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 4 Aug 2003 04:38:32 -0400

>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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

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

Reply via email to