I have a Telerik report with a graph. The graph's x-axis is a series of dates. Our client would like those dates in order from oldest to most recent. They also want the dates formatted to not include the time portion of the date. I've tried for the past day to get this to work and can't figure it out. Can someone explain how to do this?
I have a Telerik report with a graph. The graph's x-axis is a series of dates. Our client would like those dates in order from oldest to most recent. They also want the dates formatted to not include the time portion of the date. I've tried for the past day to get this to work and can't figure it out. Can someone explain how to do this?
My data query is this
SELECT AnalysisNumber
, DateSampled
, ViscosityAt100C
FROM tblSample
ORDER BY a.DateSampled ASC
The results show the dates in the order I want them and the dates are formatted properly.
AnalysisNumber DateSampled ViscosityAt100C
2146951 2015-12-17 13.5
2148323 2015-12-30 12.8
2149080 2016-01-11 13.9
2152284 2016-02-03 13.3
2153660 2016-02-18 13.6
2158736 2016-03-09 13.7
2158737 2016-03-16 13.8
But when the graph is displayed, the dates show with the time: 12/17/2015 12:00 a.m. I've set the LabelFormat to {0:d}, but the time portion of the date still shows. I've tried several formats there, but done seem to change it at all.
I tried to convert the date to a varchar and format it, but then the dates are not in the proper order. I also tried having a text version of the date and a date version of the date in my SQL query, using the text version as the grouping and the date version as the sorting, but that resulted in not showing anything on the x-axis.
How do I get the dates to be formatted properly but still sorted like a date?
For a fuller explanation with screenshots, look at this: Formatting dates on graph