Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Dates in AddNewSampleRecord
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kitmax

3 Posts

Posted - 18 Mar 2010 :  09:04:42  Show Profile  Reply with Quote
I have some sample data in SQL which i'm able to query into sub groups and add to an xbar r graph, however, if i try to add the time i keep getting the following error.
Unable to cast object of type 'System.DateTime' to type 'com.quinncurtis.chart2dnet.ChartCalendar'
I've tried all different types but having no success, the date is a datetime object in sql that i'm pulling.

any ideas?

thanks

quinncurtis

1586 Posts

Posted - 18 Mar 2010 :  09:54:05  Show Profile  Reply with Quote
The time values for the AddNewSampleRecord method are ChartCalendar types. We use the ChartCalendar class because it contains extensive time/date arithmetic methods we use in calculations. So that is the type you must use. So convert your DateTime values to ChartCalendar values. This is trivial because the ChartCalendar class has a constructor which takes a DateTime value as an input parameter.

DateTime dt = GetSampleDateTimeValue();


// Convert the DateTime value to a ChartCalendar value, and call the AddNewSampleRecord method

this.ChartData.AddNewSampleRecord(new ChartCalendar(dt), samples);

Go to Top of Page

kitmax

3 Posts

Posted - 18 Mar 2010 :  11:03:48  Show Profile  Reply with Quote
got it, thank you so much
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07