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
Re: reading time format [message #92644 is a reply to message #92636] Mon, 01 February 2016 03:56 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
This works...

IDL> s='9/30/2015 23:17 3 10 '
IDL> t=0d
IDL> d[0,0]
IDL> reads,s,t,d,format='(C(CMOI,CDI,x,CYI,x,CHI,x,CMI), 2(I2,1x))'
IDL> caldat,t,mn,dy,yr,hr,mt & print,yr,mn,dy,hr,mt,d
2015 9 30 23 17 3 10

I built up the format code one unit at a time - I'm not sure why CMOI is not follwed by an x, when CDI is. I think the '/' must be behaving as a special char here.

Note that you must use a double to read time with minutes.

cheers,
Greg
[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 13:56:38 PDT 2025

Total time taken to generate the page: 0.00445 seconds