Link to home
Start Free TrialLog in
Avatar of RDeWolfe
RDeWolfe

asked on

Formatting Datetime in ReportViewer Chart to Show Only Date

I'm pretty new to the Visual Studio ReportViewer, and I'm having a problem formatting a datetime value on a ReportViewer chart.  In the chart itself I have dates along the X-axis which all display in the standard dd/mm/yyyy hh:mm:ss format.  Well, the hh:mm:ss values will always be 12:00:00 am, so I would like to just remove this from the display.  I'm sure there is a simple way to do this, and I am just missing it.  Can someone point me in the right direction?  Let me know if you need anything from me.  Thanks in advance for your help.
Avatar of Aneesh
Aneesh
Flag of Canada image

try any of these

SELECT CONVERT(varchar, DateColumn,101) DateColumn
SELECT CONVERT(varchar, DateColumn,103)DateColumn  
Avatar of RDeWolfe
RDeWolfe

ASKER

Thanks for the quick response.  Sorry if this seems naive, but try them where?  Try them in the SQL query itself, or can I format the value in the properties of the chart somewhere?
i am not sure abt that part
Format in properties

d
SQL_SERVER_DBA:
This works for a text field on the report, but when I set it on my chart - it has no effect.  How can I adjust the format properties of the 'category' on the x-axis?  This is where the dates are.
ASKER CERTIFIED SOLUTION
Avatar of RDeWolfe
RDeWolfe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial