• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2789
  • Last Modified:

Sorting by DATE and TIME in Visual Studio Reporting (SSRS)

I have a report that has field called START_TIME. This field is a date field. When I run the ORDER BY in the query it is correct. When I run the report using PREVIEW that date is not sorted. How do I sort the date show it displays in my report correctly?
0
allenkent
Asked:
allenkent
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>When I run the report using PREVIEW that date is not sorted

1.

Check your matrix/tablix's Row Groups properties, then Sorting, and see if the report is sorting at all, which will override the query's sort order.

2.

Make sure the Data Set shows that column as a datetime, and not text.
0
 
allenkentAuthor Commented:
1) I have checked and add START_DATE to my tablix and it does not work. No sorting in tablix seems to work

2) My table shows as DATETIME field. Why would the data set change value? How?
0
 
PortletPaulfreelancerCommented:
are you applying a format to that datetime field in the query?

e.g.
convert(varchar, START_DATE ,111)
0
 
Alpesh PatelAssistant ConsultantCommented:
Please check Matrix Sort order.

Select Matrix=> Property=> Soring Tab=> Select Starte_DAte Column.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now