Hi, for comparison reasons I'm trying to get an integer field containing the previous month in a master file (201208 if we're September)
Although it sounds simple enough I just can't find it!
original idea: DEFINE PREVMON/I6=EDIT(DATECVT(DATEADD(&YYMD,'M',-1),'YYMD','YYM'))This message has been edited. Last edited by: Peter,
Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
September 05, 2012, 02:10 PM
Prarie
DEFINE FILE CAR
TODAY/YYMD = &YYMD;
PRIOR_MO/YYMD=DATEADD(TODAY,'M',-1);
PRIORM/M = PRIOR_MO;
PRIORY/MYY = PRIOR_MO
END
TABLE FILE CAR
PRINT CAR TODAY PRIOR_MO PRIORM PRIORY
END
September 05, 2012, 04:54 PM
Alan B
To get this as an integer is not so straight forward, but in an MFD you can try: