Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] x months ago

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] x months ago
 Login/Join
 
Gold member
posted
Okay, I'm half-way giving up here:

All I need to do is calculate the difference between a field FINMONTH in format I6YYM and today's date in the number of months.

I've just spent 1.5 hours trying every combination of DATECVT & DATEDIF I can come up with and I can't let it work!

This has to be possible in a single define?
(I can't believe something so simple is taking me so much time...)

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
 
Posts: 59 | Registered: April 23, 2012Report This Post
Platinum Member
posted Hide Post
TABLE FILE EMPLOYEE
PRINT FIRST_NAME
COMPUTE DT_FLD/I6YYM = 201106;
COMPUTE DT_FLD_MDYY/MDYY = DT_FLD;
COMPUTE TODAY/MDYY = '&MDYY';
COMPUTE DT_DIFF/I8 = DATEDIF(DT_FLD_MDYY, TODAY, 'M');
BY LAST_NAME
END

Enjoy!


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Virtuoso
posted Hide Post
Or simpler:
TABLE FILE EMPLOYEE
PRINT FIRST_NAME 
COMPUTE DT_FLD/I6YYM = 201106;
COMPUTE MONTHS_HIRED/I3 = YM(DT_FLD,EDIT(EDIT(&YYMD,'9999999')), 'I3');
BY LAST_NAME
END



Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
You can also use:
&DATEYY|&DATEM

instead of:
EDIT(EDIT(&YYMD,'999999$$'))


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Thanks for the response all.

It seems my 'intuitive' thinking from previous years needs to be modified a bit to arrive at a more 'webfocus-oriented' thinking...


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] x months ago

Copyright © 1996-2020 Information Builders