I've used this before
        WHERE dep_date BETWEEN #startDate# AND #endDate#

your start date should be the 1st (1-#month#-#year(now())#) of the month and
end date being the last of the month (31-#month#-#year(now())#)


> -----Original Message-----
> From: Francis, Jennifer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 23, 2001 8:12 AM
> To: CF-Talk
> Subject: Newbie question - query by month
> 
> 
> I have a date field (completedate) stored in my database.  I 
> want to be able
> to pull out all of the records by a selected month for a 
> month-end report.  
> 
> Is there an easy way of doing this?  I've tried 
> 
> where datepart('m', completedate)='#month#' 
> 
> but I keep getting an "invalid column name" error.
> 
> Any help would be MUCH appreciated...  
> 
> Jennifer Francis
> AT&T Wireless
> Training Development & Design
> [EMAIL PROTECTED]
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to