Page 1 of 1

Convert date string to date value

Posted: Mon Apr 27, 2015 10:56 am
by vivienle
Hello,
I'm trying to convert a date string in the format of 1999M02 (date string obtained from: smpl if seriesX <> na, %firstdate = @otods(1)) to a date value. Could you please help? I've been looking and googling but can't figure out how.
Thanks,
vivien

Re: Convert date string to date value

Posted: Mon Apr 27, 2015 11:19 am
by EViews Gareth
@dateval

Re: Convert date string to date value

Posted: Mon Apr 27, 2015 11:24 am
by vivienle
Hello,
I did look at @dateval. But I need to provide the format of the date string and I don't know what I'm supposed to use as formats shown in the manual are all in normal date formats such as "mm/dd/yyyy", "month dd, yyyy".
So, @dateval("1999M02", "what do I put in here?")
Thanks,
vivien

Re: Convert date string to date value

Posted: Mon Apr 27, 2015 11:37 am
by EViews Gareth
You can leave the second argument blank. EViews will figure it out.

Re: Convert date string to date value

Posted: Mon Apr 27, 2015 11:45 am
by vivienle
Thanks! It works!