Just off the top of my head I think that will work as you have it. There's a
month() funciton in SQL. As long as your date variable looks like a date.

-----Original Message-----
From: B G [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 03, 2003 1:57 PM
To: CF-Talk
Subject: OT: SQL - Selecting a Month


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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to