computer
 






 

Question by  Conjurer (53)

How do I create an Access query that sorts by month?

 
+5

Answer by  lokindra (481)

The easiest way would be to ensure that the data format in the table is set to date - then you should be able to easily sort by date. If that's not an option, try a query similar to: SELECT Format([TheDate], "dd/mm/yyyy") As DateField FROM TheTable ORDER BY [TheDate];

 
+5

Answer by  nimrod (321)

Depending on the table and the fields you are using. If you record dates in a field with date format, you need to extract the month from that field using the function MONTH, the name of the field and the name of the table, so your query should be something like: SELECT MONTH(FIELD_NAME) FROM TABLE_NAME;

 
+5

Answer by  BeefStrule (690)

First, open your Access database. Choose the months you want to sort by and look for an option that lets you query those particular months. Try pressing CTRL-S to start the search.

 
+5

Answer by  willynel (57)

In SQL view, make sure that you type Order By and whatever the name of the field is that contains the date information. Type DESC after the field for the latest times entered and ASC for the earliest times entered. In the design pane, find the same field and click on the "Sort" row and select "Ascending" or "Descending".

 
+5

Answer by  crambo (117)

The ORDER BY clause will allow you to sort on a specified field. For example you would have: select * from t_table_name order by some_column_name

 
+3

Answer by  japratt (1687)

If your are wanting to create this type of query you will want to be in database view first. Then you will wan to click on sort by month function.

 
+0

Answer by  Moksha (2)

Sorting on just a portion of the date values requires writing an expression in the query region of the Filter tab. Switch query to Datasheet view. Then the Home tab,click the Sort & Filter group,click Advanced then Advanced Filter/Sort. Type the expression Expr1: DatePart("m",[BirthDate]) in Field-row in the first-column. The DatePart function in the first-column sorts the records by month.

 
You have 50 words left!