transform string into data vector

17 views
Skip to first unread message

emma

unread,
Mar 11, 2014, 6:56:55 AM3/11/14
to iris-t...@googlegroups.com
Hi!

I am rather new to IRIS and I would appreciate enormously if you can help me out with a simple (?) thing which I wasnt able to figure out in 2 days now.

How can I transform a datestring as in '2013Q4' into a date vector (2013,4). I guess it should be rather handy, but i could not find any hints anywhere.  Thank you!

Ema

Jaromir Benes

unread,
Mar 11, 2014, 9:37:23 AM3/11/14
to emma, the-iris-toolbox [discussion forum]
Hi Ema

the function you're looking for is str2dat, e.g. str2dat('2010Q4'). It can handle a wide range of date formats, not only the default IRIS format, in which case you need to use the option 'dateFormat='. This function is described in the section on Dates, subsection Converting dates in the reference manual.

Best,
Jaromir


--
You received this message because you are subscribed to the Google Groups "iris-toolbox-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iris-toolbox...@googlegroups.com.
To post to this group, send email to iris-t...@googlegroups.com.
Visit this group at http://groups.google.com/group/iris-toolbox.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages