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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
date
 Login/Join
 
<RBC007>
posted
Another newbie quesiton ... This is very basic however I have to ask, because I'm new to this. I need help with a Daily Business week (M-F)report that will calculate the date for yesterday something like the example below that is a weekly fomula.
SET BUSDAY = _MTWTF_
DEFINE FILE TABLENAME
CDATE/YYMD=&YYMD;
NDATE/YYMD=DATEADD ( CDATE, 'D', -5 );BDATE/YYMD=DATEMOV ( NDATE, 'BOW' );EDATE/YYMD=DATEMOV ( NDATE, 'EOW' );
END WHERE ( ONDATE GE BDATE AND
ONDATE LE EDATE );
After reading the links, I still need help.....
https://forums.informationbuilders.com/eve/forums/a/...201067331#5201067331 https://forums.informationbuilders.com/eve/forums/a/...631097331#3631097331

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Expert
posted Hide Post
If you're trying to calculate yesterday's date from a YYMD date field, all you have to do is subtract 1 from the date.

SET BUSDAY = _MTWTF_

DEFINE FILE CAR
CDATE/YYMD=&YYMD;
NDATE/YYMD=DATEADD ( CDATE, 'D', -5 );
BDATE/YYMD=DATEMOV ( NDATE, 'BOW' );
EDATE/YYMD=DATEMOV ( NDATE, 'EOW' );
YDATE/YYMD=CDATE-1;
END

TABLE FILE CAR
PRINT COUNTRY CDATE NDATE BDATE EDATE YDATE
WHERE RECORDLIMIT EQ 1
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<RBC007>
posted
(last business day)

Francis thanks for your help... and yes thats it, however I might not have said/suggested Business days.

As today is "Mondays" The report should reflect the values for Friday (last business day) as it currently shows values for Sunday (previous day).

DEFINE FILE CAR
CDATE/YYMD=&YYMD;
YDATE/YYMD=CDATE-1;
END


WHERE ( ONDATE EQ YDATE );
 
Report This Post
Expert
posted Hide Post
Hi RBCanada,

You need the follwing change to achieve what you require -

SET BUSDAY = _MTWTF_

DEFINE FILE CAR
CDATE/YYMD='2005/07/18';
NDATE/YYMD=DATEADD ( CDATE, 'D', -5 );
BDATE/YYMD=DATEMOV ( NDATE, 'BOW' );
EDATE/YYMD=DATEMOV ( NDATE, 'EOW' );
YDATE/YYMD=DATEADD(CDATE,'WD',-1);
END

TABLE FILE CAR
PRINT COUNTRY CDATE NDATE BDATE EDATE YDATE
WHERE RECORDLIMIT EQ 1
END

My contract finishes in Sept, I'm open to offers for that time onwards Smiler S.C. has my contact details if he's still there!!
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders