Category / Section
How to provide the input data of DateTime type?
1 min read
The Start date and time must be expressed using instance of DateTime class. If you want to add the days, AddDays() method can be used with that instance. AddHours() and AddMinutes() are for displaying hours and minutes.
C#
DateTime start = new DateTime(2006, 11, 1);
ChartSeries series = this.chartControl1.Model.NewSeries(“”);
series.Points.Add(start.AddDays(7), 363);
series.Points.Add(start.AddDays(14), 417);
VB
Dim start As DateTime = new DateTime(2006, 11, 1)
ChartSeries series = Me.chartControl1.Model.NewSeries(“”)
series.Points.Add(start.AddDays(7), 363)
series.Points.Add(start.AddDays(14), 417)