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.
MYYEAR --> returns the year from 5 months ago = 2011 MYMONTH --> returns the month from 5 months ago = 12
We do this a lot. I would LOVE to make this simpiler by building a DEFINE FUNCTION that will calculate the year by passing in 2 variables (aDate, aMonthsAgo). I gave it a try but I keep getting the following error. Can someone point me in the correct direction?
My code: DEFINE FUNCTION GETYEAR(myDate/I8YYMD, pastMonths/I2) GETYEAR/YY = DATECVT(DATEADD(DATECVT (myDate, 'I8YYMD', 'YYMD'),'M', pastMonths ), 'YYMD','YY');; END
To Recap: The difference between my code (not working) and your code (working): 1) Add the RUN statement after the DEFINE FUNCTION 2) Remove the extra ; (wish Dev Studio could tell me I did this :-) 3) Remove the data type in the calling of GETYEAR()
Originally posted by susannah: you know about the AYMD and AYM functions?
Agreed WF offers a lot of options for working with dates. The reason why I didn't choose to use AYM is because of the required date format of (Year/Month). I like working with full dates. Even if the end game is just using the Month or Year format. AYMD I see no need for :-), but that is because my apps are mostly months at a time, and not X # of days.
Sorry I wasn't more clear, the "fixes" were based on the original post code. Just wanted to offer readers the ability to see what was wrong with the original, and how the second one fixed it. I guess I just added more confusion.