Yep, should work.  SQL Server Books Online says:

MONTH
Returns an integer that represents the month part of a specified date.

Syntax
MONTH ( date )


Looks the same to me!


-----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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to