Focal Point
[SOLVED] DATEMOV to calculate start and end of year

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6407098295

November 02, 2010, 03:58 PM
JBK
[SOLVED] DATEMOV to calculate start and end of year
I'm using DATEMOV in Dialogue Manager to calculate various date ranges, and up until now, the results have been correct. This code yields the following incorrect results:

 
-SET &TODAY = EDIT(&DATEYYMD, '9999$99$99');


-* Current Year

-SET &BEGIN_DATE   = DATECVT((DATEMOV((DATECVT(&TODAY,'I8YYMD','YYMD')),'BOY')),'YYMD','I8YYMD');
-SET &BEGIN_DATE   = DATECVT((DATEMOV((DATECVT(&TODAY,'I8YYMD','YYMD')),'EOY')),'YYMD','I8YYMD');

-TYPE BEGIN_DATE = &BEGIN_DATE
-TYPE END_DATE = &END_DATE  



BEGIN_DATE = 20101231
END_DATE = 20110228


The only diference in this syntax from the Current Quarter and Current Month syntax which works correctly is the 'BOY' and 'EOY'.

What needs to be adjusted for this to work correctly?

Thank you.

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL
November 02, 2010, 04:05 PM
j.gross
Just change the second
-SET &BEGIN_DATE
to
-SET &END_DATE
November 02, 2010, 04:19 PM
JBK
Thank you. I have to laugh -- I don't catch my own typos!


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL