I believe you need to use the "CreateODBCDateTime" function.
-----Original Message-----
From: Mark Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 14 September 2000 12:36
To: [EMAIL PROTECTED]
Subject: SQL where?
Ok, here is the puzzle I am trying to use a WHERE statement to compare a
loop to a table it should work fine if I can get the date/time values to
match but the raw date format is different
CF raw date/time looks like this 1899-12-30 06:24:00
Access raw date/time looks like this {ts '1899-12-30 06:24:00'}
So if my assumption is true (I have not done this with a loop yet.) the only
thing I need to do is some how format these date/time values within the SQL
statement. If this is possible I can remove about 5 <cfif> blocks.
So, my question is can dates be formatted in an SQL statement? HUMMMM!
Thanks for any input!
-Mark :o)
<CFSET StartTime1 = CreateTime(06, 00, 00)>
<CFSET TeeTime = #DateAdd('N', -8, StartTime1)#>
<CFLOOP index="TodaysTeeTime" from="1" to="92">
<CFSET TeeTime = #DateAdd('N', 8, TeeTime)#>
<CFQUERY NAME="Events" DATASOURCE="caltest">
SELECT cal.ID, cal.Players, cal.TeeDate, cal.BookedTeeTime,
cus.CompanyName, cus.ContactFirstName, cus.ContactLastName, cus.PhoneNumber,
cus.EmailAddress
FROM Calendar cal, Customers cus
WHERE cal.CustomerID = cus.CustomerID
AND #TeeTime# = cal.BookedTeeTime
ORDER BY cal.BookedTeeTime
</CFQUERY>
</CFLOOP>
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.