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     SOLVED Using Date Filters with Datedif

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SOLVED Using Date Filters with Datedif
 Login/Join
 
Member
posted
posted September 15, 2015 07:12 AM
UPDATE: Problem solved. There weren't any replies to this, but I can post the solution if needed.

Hi all!
I'm trying to run a report where I take two input fields - start and stop date - and calculate the datedif between both of them. I believe the start stop date should be coming in as MDYY as that is how my data type is setup for this particular filter field. I'm trying to convert the two inputs to a suitable format for the datedif function and storing each in a variable to be called in my datedif function. It seems simple enough, but I'm new to this program and I've decided to pose my problem to the community. Here's what I have so far:

DEFINE FILE UTILIZATION_V3
User_IN_START/I8=DATECVT ( &START, 'MDYY' , 'I8YYMD' ) ;
START_DATE/YYMD = User_IN_START;
User_IN_STOP/I8=DATECVT ( &STOP, 'MDYY' , 'I8YYMD' ) ;
STOP_DATE/YYMD = User_IN_STOP


END
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE UTILIZATION_V3
SUM COMPUTE WorkDays/I5=DATEDIF ( User_IN_START , User_IN_STOP , 'BD' ) ;
BY UTILIZATION_CAPACITY_SUMMARY_V3.DATES.CLNDR_DTE
WHERE UTILIZATION_V3.DATES.CLNDR_DTE GE '&START.CLNDR_DTE:.';
WHERE UTILIZATION_V3.DATES.CLNDR_DTE LE '&STOP.CLNDR_DTE:.';

I added the START/STOP_DATE variables based on this code that I found on an IB support page with 10 tips about date and time. I tried converting directly form the 'MDYY' to 'YYMD', but it didn't seem to work. Any help is appreciated.

from user Francis Marioni:
START_DATE_I/I8YYMD = START_DATE;
START_DATE_YYMD/YYMD = START_DATE_I;

TODAY_YYMD/YYMD = &YYMD;
NUMBER_OF_DAYS/I9 = DATEDIF(START_DATE_YYMD, TODAY_YYMD, 'D');
END

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 1 | Registered: September 14, 2015Report 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     SOLVED Using Date Filters with Datedif

Copyright © 1996-2020 Information Builders