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] Adding number of days to a virtual date field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Adding number of days to a virtual date field
 Login/Join
 
Member
posted
My task is to calculate an expiration date and populate on a report as a field. The expiration date is a calculation that adds the shelf-life number of days (field in a table xld_1) to another date (virtual field exdt_2) to arrive at a date where the material is expected to expire. I believe I need to create a define by adding the shelf life days (DATEADD??) to the other date but not sure how to achieve this and any help or example would be greatly appreciated.

Solution Solved: ExpDate/YYMD= DATEADD(ExpYYMD, 'D', IR_SLD_I);

This message has been edited. Last edited by: Kort Thompson,


KW

WF Versions: DEV 8105 OS: Windows Outputs: HTML, Excel
In WebFOCUS since March '19
 
Posts: 11 | Registered: March 18, 2019Report This Post
Virtuoso
posted Hide Post
Have a look at the fallowing : DTADD: Incrementing a Date or Date-Time Component

Also, please update you signature to add your WF version. That may help to point you to the proper solution according to your version

And why [Advise??] in your subject ? Try to stay with forum's structure : Forum Guidelines


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Thank you Martin for the guidance.


KW

WF Versions: DEV 8105 OS: Windows Outputs: HTML, Excel
In WebFOCUS since March '19
 
Posts: 11 | Registered: March 18, 2019Report This Post
Virtuoso
posted Hide Post
Hi Kort,

Here a simple sample where I extract a NBDAYS value to increment from based on another file
TABLE FILE CAR
BY SEATS AS 'NBDAYS'
WHERE COUNTRY EQ 'JAPAN';
ON TABLE HOLD AS INCRDAYS
END
-RUN
-READFILE INCRDAYS
-DEFAULTH &NBDAYS = 0
-TYPE NBDAYS: &NBDAYS

DEFINE FILE WF_RETAIL
NEWDATE/YYMD = DTADD(DATE_OF_BIRTH, DAY, &NBDAYS);
END
TABLE FILE WF_RETAIL
SUM DATE_OF_BIRTH
    NEWDATE
BY ID_MANAGER
ON TABLE SET PAGE NOPAGE
END
-RUN

Look at manager id 901 where the DTADD function manage the fact the +4 days has also changed the month


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Thanks for the help Martin! Really appreciate you


KW

WF Versions: DEV 8105 OS: Windows Outputs: HTML, Excel
In WebFOCUS since March '19
 
Posts: 11 | Registered: March 18, 2019Report This Post
Virtuoso
posted Hide Post
Wink My pleasure

If solved, please edit your first post then add [SOLVED] at the beginning of the subject instead of [SHARING] which is not the case for that post.
You were not sharing with us a solution that you found, but was asking for a solution.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 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] Adding number of days to a virtual date field

Copyright © 1996-2020 Information Builders