Bad Date Format
Posted: Thu Sep 16, 2010 9:36 am
I am using the latest version of EViews 7.1
I generate a new sample based on a calculated offset which I am adding to the the string definition of my lower sample bound. This works, but my new sample bound looks like 1999m01+5 @last - which is not impossible to read, but starts to be tough for passing to a subroutine. As such, I'm looking to create a new datestring "1999m06" set my bound.
@dateval(%beg_hist) converts %beg_hist to an appropriate value.
@dateadd adds !begsmpl (5 months) to that value.
but @datestr returns a Bad date format 'yyyy[M]period' in "%MINE = @DATESTR(@DATEADD(@DATEVAL("1989M03"),232,"MM"),"YYYY[M]PERIOD")".
Any date formatting seems to return this result. To my knowledge I've got the inner part right and I'm just stuck with the @datestr at this point. Any assistance on how to get %test_bound to translate properly to "1999m06" would be appreciated.
I generate a new sample based on a calculated offset which I am adding to the the string definition of my lower sample bound. This works, but my new sample bound looks like 1999m01+5 @last - which is not impossible to read, but starts to be tough for passing to a subroutine. As such, I'm looking to create a new datestring "1999m06" set my bound.
Code: Select all
%beg_hist = "1999m01"
!begsmpl = 5
%test_bound = @datestr(@dateadd(@dateval(%beg_hist),!begsmpl,"mm"),"yyyy[M]period")
@dateadd adds !begsmpl (5 months) to that value.
but @datestr returns a Bad date format 'yyyy[M]period' in "%MINE = @DATESTR(@DATEADD(@DATEVAL("1989M03"),232,"MM"),"YYYY[M]PERIOD")".
Any date formatting seems to return this result. To my knowledge I've got the inner part right and I'm just stuck with the @datestr at this point. Any assistance on how to get %test_bound to translate properly to "1999m06" would be appreciated.