PKirby
PKirby

Reputation: 879

SSRS Date column sorting

I have a SSRS 2008 R2 tablix which displays like this :

 _____________________________
|               |    Date     |
|_____________________________|
|     Row1      |             |
|     Row2      |             |     
|     Row3      |             |
|_______________|_____________| 

The Date displays data in YYYY/mmm format (2015/01 , 2015/02, 2015/03). This column has a grouping on it (column group).

The current sorting sorts the dates incorrectly (2015/1 , 2015/10 , 2015/11)

I have tried sorting by adding a sorting option in the Tablix Properties (AtoZ) but this doesn't work.

Any help would be greatly appreciated.

Upvotes: 1

Views: 1803

Answers (2)

Black_T
Black_T

Reputation: 477

You can apply conversion in sorting expression. Try to use:

=CDate(Fields!DateString.Value)

enter image description here

Upvotes: 3

sqluser
sqluser

Reputation: 5672

Your dates are probably stored as strings.

So convert them to date

CAST(yourDateString AS DATE)

Upvotes: 4

Related Questions