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

Need to pull out the earliest date of each month

Status
Not open for further replies.

njosefik

Technical User
Jun 5, 2000
3
US
I have a list of dates collected over many years.&nbsp;&nbsp;I need to pull out the fields with the earliest date of each month.&nbsp;&nbsp;They are already sorted in order but I can't figure a way to pull out the first date of each month.&nbsp;&nbsp;Can anyone help??<br><br>Thanks,<br>Nick
 
try this<br><br>SELECT Min(table1.date) AS MinOfdate, Format([date],&quot;yy\,mmm&quot;) AS [year/Month]<br>FROM table1<br>GROUP BY Format([date],&quot;yy\,mmm&quot;)<br>ORDER BY Min(table1.date);<br><br>you will need to replace the table1 with your table name and date with the name of your date field<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top