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

Home » Public Forums » archive » reading time format
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
reading time format [message #92636] Thu, 28 January 2016 08:04 Go to previous message
limiqt is currently offline  limiqt
Messages: 27
Registered: October 2013
Junior Member
Hi everyone,
I was wondering if someone could show me how to read a time in IDL. My orignal data are huge and I have about 200 of those files so using Read_ASCCI funtion is not a option. Only the first column is date and the others columns are numbers.

So I need to read the time (eg. 9/30/2015 22:00)

To simplify I have has this example

datain

9/30/2015 23:00 3 10
9/30/2015 23:30 4 10
10/1/2015 0:00 5 10
10/1/2015 0:30 6 10

And My code looks like:

Pro MyCode
Close, /All

FileIn='data_in'
MyFormat='(C(CMOI2.2,"/",CDI2.2,"/",CYI4,1x,CHI2.2,":",CMI2.2), 1x, 2(I2,1x))'

M=FltArr(3,4)

OPENR, unit, dataIn,/GET_LUN
READF, unit, M, format = MyFormat
PRINT, FORMAT=MyFormat, M
FREE_LUN, unit

Print, 'Done :-)'
End


However, I am getting then message:
% Unable to apply format code CYI to input: "/201".

Does some could tell me what I am doing wrong?

Thanks

Lim
[Message index]
 
Read Message
Read Message
Previous Topic: Mac OSX Capitan and IDL
Next Topic: SVN connector missing

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

Current Time: Wed Oct 08 11:54:26 PDT 2025

Total time taken to generate the page: 0.00525 seconds