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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSAccess query. Extract distinct month name.

Status
Not open for further replies.

contiw

Programmer
Jun 28, 2002
25
US
Need to extract distinct month name from date column.
I have found something like this
-----
SELECT DISTINCT Format(appointmentdate,'mmmm') AS distinctmonth
-----
which does not work.
Please advise. Thank You.
 
Try using the DatePart function in your query.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
SELECT DISTINCT Format(appointmentdate,'mmmm') AS distinctmonth
Works for me (access2003), as this:
SELECT DISTINCT MonthName(Month(appointmentdate)) AS distinctmonth

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top