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.
TESTING is coming back as 43772630 TESTING2 is coming back as 43974860 DAYSAPART is coming back as 202230
Obviously this is incorrect. Can someone please tell me what I am doing wrong here? I have tried this numerous different ways, and the final result is always the same (number of days * 1070).
MAXDATEFORYEARSTR/A20=IF TODAYYY EQ &SEPARATIONYEAR THEN TODAY('A10') ELSE '12/31/'|&SEPARATIONYEAR.EVAL;
[Edited] SEPARATIONYEAR is presumably a database variable, rather than a report parameter, so make that
MAXDATEFORYEARSTR/A20=IF SEPARATIONYEAR EQ TODAYYY THEN TODAY('A10') ELSE '12/31/' | SEPARATIONYEAR;This message has been edited. Last edited by: j.gross,
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Dan, Your example implies that you are starting with date data stored as a string. On that basis I created the following test. -* File test.fex SET ONLINE-FMT=PDF DEFINE FILE DATETIME DATESTRING1/A10 = '01/01/2013' ; DATESTRING2/A10 = '07/09/2013' ; DATESTRING3/A8MDYY = EDIT(DATESTRING1,'99$99$9999') ; DATESTRING4/A8MDYY = EDIT(DATESTRING2,'99$99$9999') ; DATESMART_1/MDYY = DATESTRING3 ; DATESMART_2/MDYY = DATESTRING4 ; DAYSDIFF/I6 = DATESMART_2 - DATESMART_1 ; END TABLE FILE DATETIME PRINT SD_MDY1 NOPRINT DATESTRING1 IN +1 DATESTRING2 OVER DATESTRING3 IN +1 DATESTRING4 OVER DATESMART_1 IN +1 DATESMART_2 IN +2 DAYSDIFF IN +1 IF RECORDLIMIT EQ 1 END -RUN DATESTRING1 & 2 are simple string values. DATESTRING3 & 4 convert these to legacy dates DATESMART_1 & 2 convert the legacy dates to SmartDates SmartDates are internally stored as days elapsed from 1901 DAYSDIFF simply subtracts to get the days between the dates (result is 189 days). DATESTRING1 01/01/2013 DATESTRING2 07/09/2013 DATESTRING3 01/01/2013 DATESTRING4 07/09/2013 DATESMART_1 01/01/2013 DATESMART_2 07/09/2013 DAYSDIFF 189 The DTxxx and DAxxx functions can also be used to accomplish this. Given the rich set of date functions in FOCUS, I'm sure there are several other methods as well. All of this and more can be found in: (Almost) 1001 Ways to Work with Dates in WebFOCUS - available at www.Aviter.com.This message has been edited. Last edited by: John W Price,
WebFOCUS 8.0.2, FOCUS since 1977 - John@Aviter.com PDF , Excel, FOCUS, Author of the Keysheets and Dates book. www.Aviter.com