fgetl and time in csv file
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Jul 10 16:45:22 CDT 2008
On 10-Jul-2008, Nicholas Oleng wrote:
| I've got a csv file I'd like to read into Octave.
|
| The typical line is as follows:
| 9/16/2007 5:26:49 PM,1.000675626, 692981.8033,USD->DKK->EUR
|
| Unfortunately, when I use fgetl I get the following:
| 9/16/2007 5:26,1.000675626, 692981.8033,USD->DKK->EUR
| where the :49 PM is omitted for some reason. Note this is how it appears when opened in Excel, although one can actually view the seconds and PM by clicking on the individual cell.
|
| How can I remedy this so that Octave can also read the second and the PM?
What version of Octave are you using? Precisely how are you using
fgetl?
I'm unable to duplicate the problem with Octave 3.0.1 on my Debian
system. Here is what I see when I save the line you show above in a
file (foo.dat):
octave:1> f = fopen ("foo.dat", "r");
octave:2> fgetl (f)
ans = 9/16/2007? 5:26:49 PM,1.000675626, 692981.8033,USD->DKK->EUR
If you think you've found a bug, please send a *complete* bug report
to bug at octave.org (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful
report).
jwe
More information about the Help-octave
mailing list