How to select the month from a date like 2004/2/16 ???

  • Thread starter Thread starter Gene
  • Start date Start date
G

Gene

For example, the database value is datatime,
I only want to select the corresponding month from the date value,
is it possible to do so?
 
Hi Gene,

The select statament depends a bit on your database.
What database are you using?
For example, with Sql server you might do: ... where month(mydatecolumn) =
@datevalue
 
I currently using ms sql server 2000
and I try what you have written, it works~
THX!!!


Miha Markic said:
Hi Gene,

The select statament depends a bit on your database.
What database are you using?
For example, with Sql server you might do: ... where month(mydatecolumn) =
@datevalue

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com
Gene said:
For example, the database value is datatime,
I only want to select the corresponding month from the date value,
is it possible to do so?
 
Back
Top