Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Dates in AddNewSampleRecord

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
kitmax Posted - 18 Mar 2010 : 09:04:42
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
2   L A T E S T    R E P L I E S    (Newest First)
kitmax Posted - 18 Mar 2010 : 11:03:48
got it, thank you so much
quinncurtis Posted - 18 Mar 2010 : 09:54:05
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);


Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07