@strdate for current sample

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

maragloria
Posts: 88
Joined: Tue Jun 29, 2010 7:09 am

@strdate for current sample

Postby maragloria » Thu Aug 29, 2019 1:19 pm

Hi there,

I understand that @strdate returns a string list corresponding to each element in workfile.
Is there a similar function available to obtain each element in the the current sample ?

Many thansk,

Mara

EViews Matt
EViews Developer
Posts: 430
Joined: Thu Apr 25, 2013 7:48 pm

Re: @strdate for current sample

Postby EViews Matt » Thu Aug 29, 2019 1:42 pm

Hello,

@strdate creates an alpha series rather than a lone string. If you want a single string containing all the sample's dates, you can use @strdate to create date strings for all observations, then use stom() to extract only the date strings for the current sample into an svector, and finally use @wjoin to combine the elements of that svector into a single string.

maragloria
Posts: 88
Joined: Tue Jun 29, 2010 7:09 am

Re: @strdate for current sample

Postby maragloria » Thu Aug 29, 2019 1:57 pm

Thanks for the prompt reply!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests