Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 TimeGroupDataset.writeGroupDataset(csv, filename)

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
rixmith Posted - 11 Jan 2010 : 18:04:56
I'm trying to save my TimeGroupDataset to a file. I used the code below:

CSV csv = new CSV();
csv.setTimeDateFormat(new SimpleDateFormat ("dd-MMM-yyyy HH:mm"));
dataset.writeGroupDataset(csv, "output.csv");

The output.csv file is created but the dates in the file aren't formatted. The dates are just numbers expressed in scientific notation like: 1.23628296E12.

a) Is this how dates are supposed to be output to the csv file?

b) When I try to create a new TimeGroupDataset using the output file produced above and the same CSV instance I get incorrect results because all the dates in the new TimeGroupDataset are 0.

What am I doing wrong?

Rick
2   L A T E S T    R E P L I E S    (Newest First)
rixmith Posted - 12 Jan 2010 : 08:15:36
Thanks, that was simple!

Rick
quinncurtis Posted - 11 Jan 2010 : 18:42:22
You should be using writeTimeSimpleDataset and readTimeSimpleDataset.

csv.setTimeDateFormat(new SimpleDateFormat ("dd-MMM-yyyy HH:mm"));


Dataset1.writeTimeSimpleDataset(csv, "c:\\SimpleBar.csv");

Dataset1.readTimeSimpleDataset(csv, "c:\\SimpleBar.csv",0,0);

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