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     Calculation between 2 dates

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calculation between 2 dates
 Login/Join
 
Silver Member
posted
I have 2 dates that I need to determine the number of days between them. One date is an A25V and the other is A10. The A25V field is displayed as 2008/01/11 so is the A10 field.


EDA764 Release * Current Software:
Unix
 
Posts: 42 | Registered: November 18, 2008Report This Post
Expert
posted Hide Post
Extract the date portion without the slashes into another field (can use EDIT) then use EDIT to convert to I8YYMD. Then equate the I field to a smartdate field, format YYMD. Then just subtract the two.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
  
date1 = A25V = '2008/01/11 '
date2 = A10 = '2008/01/11'

date1a/I8YYMD = EDIT(date1,'9999$99$99');
date1b/YYMD = date1a;

date2a/I8YYMD = EDIT(date2,'9999$99$99');
date2b/YYMD = date2a

difference/I6 = date1b - date2b;
  


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,
 
Posts: 35 | Location: DFW Texas | Registered: May 30, 2008Report This Post
Silver Member
posted Hide Post
I'm sorry the fields are 11/28/2008 instead of 2008/11/28.


EDA764 Release * Current Software:
Unix
 
Posts: 42 | Registered: November 18, 2008Report This Post
Expert
posted Hide Post
Then do what Ken and I suggested and move them instead to MDYY fields, THEN convert using an equality to YYMD and do the subtract.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
The A25V field is Start_Date and the A10 field is Episode_Load_Date. The Start_dt1 field give me an error stating it (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:START_DT1.
Am I missing someting.


START_DT1/I8MDYY = EDIT(START_DATE,'99$99$9999');
START_DT2/MDYY = START_DT1;
EP_DT1/I8MDYY = EDIT(EPISODE_LOAD_DATE,'99$99$9999');
EP_DT2/MDYY = EP_DT1;
DAYS_DIFF/I6 = EP_DT2- START_DT2;


EDA764 Release * Current Software:
Unix
 
Posts: 42 | Registered: November 18, 2008Report This Post
Expert
posted Hide Post
IM,

You can't do an edit/mask directly into an integer field. You either have to do a double edit or create an A first then an I. You are going to have the same problem with the other date. You might want to look in the Using Functions manual and read up on EDIT. Here is your code with the first date using the double EDIT.

START_DT1/I8MDYY = EDIT(EDIT(START_DATE,'99$99$9999'));
START_DT2/MDYY = START_DT1;
EP_DT1/I8MDYY = EDIT(EPISODE_LOAD_DATE,'99$99$9999');
EP_DT2/MDYY = EP_DT1;
DAYS_DIFF/I6 = EP_DT2- START_DT2;


I will leave you to fix the rest of it.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
Ginny
I has a senior moment
Thank you.


EDA764 Release * Current Software:
Unix
 
Posts: 42 | Registered: November 18, 2008Report 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     Calculation between 2 dates

Copyright © 1996-2020 Information Builders