0

I have the following table in Microsoft Access

TransactionDate Market Details Opening Closing Size Profit/Loss

I want to run a query that shows the Profit/Loss for each month.

I have been able get a query that returns the information in the following format

TransactionDate By Month Sum Of Sum Of Profit/Loss

April 2014 €1,084.99

April 2015 €674.33

April 2016 €2,057.30

August 2014 €237.59

August 2015 -€267.82

December 2014 €375.88

December 2015 -€1,161.97

February 2015 -€603.87

February 2016 -€124.71

January 2015 €75.11

January 2016 -€1,044.35

But what I want now is for it to display in chronological order as oppose to Alphabetical order.

For example

January 2014

February 2014

March 2014

etc.

1
  • Your date column is defined as String or as Date? Commented Jul 11, 2016 at 14:31

1 Answer 1

0

I will consider that your TransactionDate field is defined as String

If you want to order by this text field in Access, you will have to use DateValue() function.

That would give:

SELECT TransactionDate FROM yourTable ORDER BY DateValue(TransactionDate) 

If your field is already formatted as a Date field, then simply use order by TransactionDate to make it work.

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect. Thank you very much.