comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reading in date & time from csv file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading in date & time from csv file [message #88622 is a reply to message #88620] Mon, 19 May 2014 08:37 Go to previous messageGo to previous message
justinclouds is currently offline  justinclouds
Messages: 25
Registered: December 2012
Junior Member
I changed the code so that time=data.field01

IDL> help, data.field01
<Expression> DOUBLE = Array[157105]
IDL> print, data.field01[0]
2014.0000

So, I did find a work around by using the readcol function from http://idlastro.gsfc.nasa.gov/ftp/pro/misc/readcol.pro

readcol,file,time, FORMAT = 'A', SKIPLINE = 30
year = strmid(time, 0,4)
month = strmid(time, 5,2)
day = strmid(time, 8,2)
hour = strmid(time, 11,2)
minute = strmid(time, 14,2)
second = strmid(time, 17,2)

This is working. However, I still don't understand why the READ_CSV cannot do the job. I also tried READ_ASCII with the same results as READ_CSV.

- D
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: hot pixels
Next Topic: The refresh method and relative coordinate positioning

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:28:09 PDT 2025

Total time taken to generate the page: 0.00472 seconds