help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fgetl and time in csv file


From: John W. Eaton
Subject: fgetl and time in csv file
Date: Thu, 10 Jul 2008 17:45:22 -0400

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 address@hidden (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful
report).

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]