Send the variable "search" to the script::
<CFSET starttime = #CreateTime(0,0,1)#>
<CFSET endtime = #CreateTime(23,59,59)#>
<CFSET timestart = #CreateODBCDateTime(search + starttime)#>
<CFSET timeend = #CreateODBCDateTime(search + endtime)#>
<CFQUERY datasource="news" name="getit">
SELECT * FROM datasource
WHERE databasedate BETWEEN #timestart# and #timeend#
</CFQUERY>
-----Original Message-----
From: Chris Chambers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 26, 2000 10:38 AM
To: [EMAIL PROTECTED]
Subject: RE: Database Dates equal to Current Date
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
WHERE datefield > #createodbcdatetime("04/25/00")#
AND datefield < #createodbcdatetime("04/26/00")#
_____________________________________
Chris Chambers
ICQ: 40311211
AIM: CTC HOME
VOX: 757-896-6393
FAX: 757-896-0774
_____________________________________
- -----Original Message-----
From: James Sleeman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 26, 2000 7:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Database Dates equal to Current Date
- ---Reply to mail from Ryan Shrout about Database Dates equal to
Current Date
>
> How can I set up the SQL statement so that all news posts with a
> certain = date are selected. My problem is that the dates in the
> database have = the date AND time, but when I try to match the
> datetime field with a = #CreateODBCDate(04/25/00)# I get no
> matches, since their is no time = associated with this. Is there a
> way to set the time field to a = wildcard?
How about
...
WHERE
MyDateField GTE #CreateODBCDate(04/25/00)# AND
MyDateField LT #CreateODBCDate(04/26/00)#
...
- ----------------------------------------------------------------------
- --------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_tal
k or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOQcbc0ejih2dfV0dEQJIfwCfXycbHHOJ/zGLSM/VeWYcDp04YZAAn2WX
3U8g3bOhTdxXWE5xgBWZCaVF
=tqlC
-----END PGP SIGNATURE-----
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
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.eGroups.com/list/cf-talk
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.