Thanks Andrew,

That fixed the problem. I was trying to be clever and let the database
do all the work - bad move. I assumed that DateAdd would create a time
too, seeing as 'hh' is a valid parameter! And it's tricky because I
can't see any way to output the value that DATEADD is creating.

Kay.

> -----Original Message-----
> From: Andrew Scott [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, 27 July 2001 5:28 AM
> To: SQL
> Subject: RE: BETWEEN and date functions
> 
> 
> It is weird, I would think that the SQL DateAdd wouldn't care 
> about the settings of the machine as you are using the SQL 
> date functions anyway.
> 
> Shit I see the problem, it is the time stamp...
> 
> Here is what I do
> 
> Create the date in Coldfusion using CreateODBCDateTime, then 
> set 2 variables using this with the time of 00:00:00 as the 
> start and 23:59:59 as the end. The reason is because the data 
> between will look at records between the time specified as well:-)
> 
> Hope that helps.
> 
> 
> 
> -----Original Message-----
> From: Kay Smoljak [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, 20 February 2002 2:52 PM
> To: SQL
> Subject: RE: BETWEEN and date functions
> 
> Thanks for all the replies. I did originally have the two 
> dates around the other way, and I had -24 instead of 24, but 
> changed it as I couldn't get it working. Here are a sample of 
> the records in the db that should be returning results:
> 
> 
> 
______________________________________________________________________
Macromedia ColdFusion 5 Training from the Source
  Step by Step ColdFusion
  http://www.amazon.com/exec/obidos/ASIN/0201758474/houseoffusion
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to