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]Date Issues: Need 1st day of the following month

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Date Issues: Need 1st day of the following month
 Login/Join
 
Member
posted
Hi All

I have a procedure which has a column 'Next Invoice Date'. I want to set up a selection criteria where this 'Next Invoice Date' defaults to the first of the following month.

Please guide me how to achieve this.

Thank You

This message has been edited. Last edited by: <Emily McAllister>,


Webfocus 8.1.05
 
Posts: 9 | Registered: November 14, 2013Report This Post
Virtuoso
posted Hide Post
There are a lot of ways to get this date. Here's one:

-* This sets current date.
-SET &&CURDATE=&YYMD;
-* This sets first day of this month
-SET &&CMONTH=EDIT(&&CURDATE,'999999') || '01';
-* This sets what the current year-month is based upon todays's date
-SET &CMONTHYYM=EDIT(&&CURDATE,'999999');
-* This sets first day of next month 
-SET &&NMONTH=EDIT(AYM(&CMONTHYYM, 1, 'I6YMD')) || '01';

-TYPE CURRENT DATE: &&CURDATE
-TYPE CURRENT YEAR MONTH: &CMONTHYYM
-TYPE FIRST DAY OF CURRENT MONTH: &&CMONTH
-TYPE FIRST DAY OF NEXT MONTH: &&NMONTH


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
Thank You for your prompt reply.

The results is what I needed, however I'm unable to figure out how to change the format of the output.

The output is in the following format:
CURRENT DATE: 20170223
CURRENT YEAR MONTH: 201702
FIRST DAY OF CURRENT MONTH: 20170201
FIRST DAY OF NEXT MONTH: 20170301

I want the FIRST DAY OF NEXT MONTH to be displayed as 03/01/2017 (MDYY format).

Can you please advise on how to change the date format.

Thank You


Webfocus 8.1.05
 
Posts: 9 | Registered: November 14, 2013Report This Post
Platinum Member
posted Hide Post
Try this

-SET &FRMTDATE = EDIT(&&NMONTH, '$$$$99$$') || '/' || EDIT(&&NMONTH, '$$$$$$99') || '/' || EDIT(&&NMONTH, '9999$$$$');


WebFOCUS
7703/7705/8105m/8201m/8202m

 
Posts: 99 | Registered: September 10, 2013Report This Post
Expert
posted Hide Post
Nams, did you read the manual? There's a wonderful section on Functions. Also, there are many examples on FocalPoint on how to use Date functions in Dialogue Manager. You should be able to find your answer using a few search techniques.

Regards,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Here's one example on using Date functions in Dialogue Manager:

http://forums.informationbuild...451007171#2451007171


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Thank you WF1326 and Francis!

I was able to get the date in MDYY format using the code as suggested by WF1326.

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


Webfocus 8.1.05
 
Posts: 9 | Registered: November 14, 2013Report 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]Date Issues: Need 1st day of the following month

Copyright © 1996-2020 Information Builders