Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting only Month from db into drop down 1

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
0
0
US
I want to get a list of months from my database. I want my drop down list to show only months that have orders. I have SQL query to get the number of the month, but how can I convert it to text?

Mark Kenyon II
 
Modify your query to get month name:
Code:
select DATENAME(month, table.datefield) AS 'MonthName' from table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top