As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I need to calculate prior 2 months from the current date in YYYY/MM/DD format using a -SET command. Can someone send me an example? Thanks.This message has been edited. Last edited by: Michele Brooks,
Here are some basic examples that I have in case I need them. You could tweak them to fit your specific needs.
-SET &&CURDATE=&YYMD;
-* This sets what Yesterday is:
-SET &&YESTERDAY=AYMD(&&CURDATE,-1,'I8YYMD');
-* This sets Current Year based upon Yesterday
-SET &&CYEAR=EDIT(&&YESTERDAY,'9999');
-* This sets Prior Year based upon Yesterday
-SET &&PYEAR=&&CYEAR-1;
-* This sets what the current month is based upon todays's date
-SET &&CMONTH=EDIT(&&CURDATE,'999999') || '01';
-SET &CMONTHYYM=EDIT(&&CURDATE,'999999');
-* This sets what last month is based upon today's date
-SET &&PMONTH=EDIT(AYM(&CMONTHYYM, -1, 'I6YMD')) || '01';
-SET &PMONTHYYM=EDIT(&&PMONTH,'999999');
-* This sets 7 days prior based upon &YESTERDAY
-SET &&P7DAY=AYMD(&&YESTERDAY,-7,'I8YYMD');
-* This sets prior 3 months based upon last month - it will generate complete data
-SET &&P3MONTH=EDIT(AYM(&PMONTHYYM, -1,'I6YYM')) || '01';
-* This sets prior 6 months based upon last month - it will generate complete data
-SET &&P6MONTH=EDIT(AYM(&PMONTHYYM, -4,'I6YYM')) || '01';
-* This sets prior 12 months based upon last month - it will generate complete data
-SET &&P12MONTH=EDIT(AYM(&PMONTHYYM, -12,'I6YYM')) || '01';
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Originally posted by BabakNYC: Here are some basic examples that I have in case I need them. You could tweak them to fit your specific needs.
-SET &&CURDATE=&YYMD;
-* This sets what Yesterday is:
-SET &&YESTERDAY=AYMD(&&CURDATE,-1,'I8YYMD');
-* This sets Current Year based upon Yesterday
-SET &&CYEAR=EDIT(&&YESTERDAY,'9999');
-* This sets Prior Year based upon Yesterday
-SET &&PYEAR=&&CYEAR-1;
-* This sets what the current month is based upon todays's date
-SET &&CMONTH=EDIT(&&CURDATE,'999999') || '01';
-SET &CMONTHYYM=EDIT(&&CURDATE,'999999');
-* This sets what last month is based upon today's date
-SET &&PMONTH=EDIT(AYM(&CMONTHYYM, -1, 'I6YMD')) || '01';
-SET &PMONTHYYM=EDIT(&&PMONTH,'999999');
-* This sets 7 days prior based upon &YESTERDAY
-SET &&P7DAY=AYMD(&&YESTERDAY,-7,'I8YYMD');
-* This sets prior 3 months based upon last month - it will generate complete data
-SET &&P3MONTH=EDIT(AYM(&PMONTHYYM, -1,'I6YYM')) || '01';
-* This sets prior 6 months based upon last month - it will generate complete data
-SET &&P6MONTH=EDIT(AYM(&PMONTHYYM, -4,'I6YYM')) || '01';
-* This sets prior 12 months based upon last month - it will generate complete data
-SET &&P12MONTH=EDIT(AYM(&PMONTHYYM, -12,'I6YYM')) || '01';
7.66 and 7.704 System: Windows / AIX / Linux Output: Mostly HTML, with some PDF, Excel and Lotus(!)
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005
Thank you both BabakNYC and Tom. Excellent dialogue manager date routines. I'll definitely keep them in my documentation file for future reference. I'm stuck on one more conversion. I need to do another -SET to get the end of the current month. My DATEMOV calculation is not coming out currently. Thanks again.