Look up the DATEPART keyword. Here is an example from something I did:
Select *
from somewhereoranother
where DATEPART(MONTH,datesubmitted)=#month(dateAdd('M',-1,now()))#
Brook
At 03:56 PM 9/3/2003 -0500, you wrote:
>I know there is an easy answer to this that's escaping me at the moment.
>
>CF has a function Month() which will pull the number of the month out of a
>date. Is there a similar function to use in a SELECT statement that works
>the same way?
>
>Here's what I want:
>
>SELECT My_Date
>FROM All_Dates
>WHERE Month(My_Date) = 8
>
>Returns all entires from All_Dates that are August. Easy?
>
>Thanks!
>
>BG
>
>_________________________________________________________________
>MSN 8: Get 6 months for $9.95/month http://join.msn.com/?page=dept/dialup
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm