We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dates showing up as integers

Thread ID:





116230 Apr 30,2014 03:44 AM UTC May 5,2014 06:13 AM UTC WinForms 3
Tags: Chart
Vaughn Miller
Asked On April 30, 2014 03:44 AM UTC

I have a chart I'm trying to figure out where the dates are showing up as integers instead of in a date format.

        For Each row As DataRow In dtChartData.Select("ClientID = " & lstClients.SelectedItems.Item(0).Name)
            series.Points.Add(DDate(row("DataDate")), CDbl(row("TotalAmt")))

row("DataDate") = #3/1/2014#
but when the chart finishes it shows up as 41699

if I break right after the Points.Add: 
series.Points(0).DateX = #3/1/2014#
series.Points(0).X = 41699.0

I've tried changing the chart.PrimaryXAxis.DateTimeFormat = "MM/dd/yyyy" but it doesn't seem to have any effect.

Anandaraj T [Syncfusion]
Replied On May 1, 2014 10:29 AM UTC

Hi Andy,

Thanks for using Syncfusion products.

We suggest you to set "ValueType" property of chart axis to "DateTime" for displaying date time values in axis.

Please refer the following code snippet to achieve this.
        'Setting date time values for primary X axis
        ChartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime
        ChartControl1.PrimaryXAxis.DateTimeFormat = "MM/dd/yyyy"


For your convenience, we have created a simple sample for displaying date time values in axis and it can be downloaded from the following link.

Please let us know if you have any concern.


Vaughn Miller
Replied On May 1, 2014 11:01 AM UTC

Cool thanks!

Anandaraj T [Syncfusion]
Replied On May 5, 2014 06:13 AM UTC

Hi Andy,

Thanks for the update. Please let us know if you need further assistance on this.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon