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]How to get the previous 6 fridays date and the coming fridays date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to get the previous 6 fridays date and the coming fridays date
 Login/Join
 
Guru
posted
Hi,

Iam trying to get the previous 6 week's friday's dates based on the current date(i.e.,5th Aug 2016,29th July,22nd July,15th July,8th July,1st July) and also the current week's friday i.e., now it would be 12th Aug 2016 but Iam unable to do so.

Could anyone please let me know how to get this done in this format - (say 1-Jul-16).

Currently Iam using this code below :
-SET &FRIDATE0 =
- DATECVT((DATEMOV((DATECVT(&YYMD,'I8YYMD','YYMD')),'EOW')),'YYMD','I8YYMD');

-*-- Calulate the previous seven Fridays---------------------------------------

-SET &FRIDATE1 = AYMD(&FRIDATE0, -7, 'I8YYMD');
-SET &FRIDATE2 = AYMD(&FRIDATE1, -7, 'I8YYMD');
-SET &FRIDATE3 = AYMD(&FRIDATE2, -7, 'I8YYMD');
-SET &FRIDATE4 = AYMD(&FRIDATE3, -7, 'I8YYMD');
-SET &FRIDATE5 = AYMD(&FRIDATE4, -7, 'I8YYMD');
-SET &FRIDATE6 = AYMD(&FRIDATE5, -7, 'I8YYMD');

-TYPE &FRIDATE0
-TYPE &FRIDATE1
-TYPE &FRIDATE2
-TYPE &FRIDATE3
-TYPE &FRIDATE4
-TYPE &FRIDATE5
-TYPE &FRIDATE6

Any help would be greatly appreciated.

Thanks a lot in advance!

Regards,
IP

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
For 1-Jul-16 you need to convert the numeric date to alpha. The manuals tell how.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
Try checking todays Day, Thursday etc., and then add the appropriate number of days, 1 for Thursday 2 for Wednesday etc and use that date for calculations


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Guru
posted Hide Post
Thanks a lot Wep5622 and RSquared for the solutions.It worked!

Thanks,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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]How to get the previous 6 fridays date and the coming fridays date

Copyright © 1996-2020 Information Builders