Hi
I want to generate a string with the current ended quarter.
these codes will do it:
%date=@date
genr adummy=@before(%date)
smpl if adummy<1
genr adummy= na
string aadate=adummy.@last
this gives me "2016Q2", which is what i want.
but, is there a more efficient way?
in contrast,
string aadate2=@datestr(@now-1, "yyyy:q")
yields "2016:3"
Thomas
Date: current quarter
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Date: current quarter
Code: Select all
=@datestr(@dateadd(@now, -1, "q"), "YYYY[Q]Q")
-
tvonbrasch
- Posts: 569
- Joined: Fri Apr 15, 2011 5:35 am
Re: Date: current quarter
perfect, thanks!
THomas
THomas
Who is online
Users browsing this forum: No registered users and 2 guests
