Try

firstdayofmonth(now())

HTH,

-- 
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com
inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server
PrismAV - Virus scanning for ColdFusion applications
>>> Find out how iMS Stacks up to the competition: 
>>> http://www.coolfusion.com/imssecomparison.cfm


--- On Tuesday, March 15, 2005 8:19 AM, Carol R scribed: ---
>
> Hi. Using SQL (IBM DB2 vers 7).  Trying to take the following where
> statement and automate it.  Currently the user has to change the date
> in the query every month.   Where effective_date<'2005-03-01'    Next
> month it'll have to be changed to <'2005-04-01'.  So in the exammple
> where effective_date <'2005-03-01', would like to have sql
> automatically calculate so that even if the query is executed on
> March 15th, the records returned would still have effective dates of
> ONLY up to 2/28/2005 (anything less than 3/1/2005).       
> 
> any ideas?
> Started playing with :  year(effect_date)<=year(current date) and
> month(effect_date)<month(current date) and day(effect_date) -> but
> this is where 
> I get stumped.
> 
> Thanks!
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2216
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to