select * from <Mytable> where datepart(month,MyDateField) = mymonthnumber

-----Original Message-----
From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 9:49 AM
To: CF-Talk
Subject: SQL question


Is there a way to use a Select query to get just the month out of a date in 
a SQL query?  I have a database that has a date field in it (so 04-10-02) 
and I want to select all the records from a specific month.

T


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to