> I don't know if any of you know how to do it but I'm trying to get the SQL
> query pasted below to include the two dates, at the moment it
> doesn't return
> data from the two dates specified. ie It returns queries starting
> Jan 02 and ending 19 Feb....
>
> SELECT DateAdded, EmailA
> FROM eShot
> WHERE ( DateAdded
> BETWEEN '2001/Jan/01'
> AND '2001/Feb/20' )
> AND EmailA LIKE '%@%'
> AND ConfCode LIKE '%cc0243%'
> ORDER BY DateAdded
What you've got to remember is that a straight date is effectively midnight
at that date and because a DateTime field is exactly that, you have to
consider a BETWEEN to return the results you specify
If you want to get the results between 1 Jan 2001 and 19 Feb 2001, you can
either do
BETWEEN '1 Jan 2001' AND '20 Feb 2001'
or
BETWEEN '1 Jan 2001 00:00:00' AND '19 Feb 2001 23:59:59'
It should always return the whole day of the Low Date in a BETWEEN, if it's
not, you should check your data and ensure there is actually data there in
the first place
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists