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.
When in report caster, the following code is returning an invalid date. When running in MR Dashboard, it's returning correct date value. Does anyone know what could be the problem?
-DEFAULT &ENTER_FROM = '04/01/2009'; //Julian date of this is 109091 -*********************************************************************** -* GET THE CURRENT JULIAN DATE USING GETSALESDATE FUNCTION. -* IT USES THE &ENTERED_DATE PARAMETER. -SET &ENTERED_DATE = &ENTER_FROM; -INCLUDE app/getsalesdate -IF &LINES EQ 0 THEN GOTO THEEND; -SET &JUL_FROM= &PDATEJUL; //&PDATEJUL is a value return from getsalesdate.fex -*********************************************************************** -SET &_FROM_GREG = GREGDT(&JUL_FROM, 'I8YYMD'); -SET &_TEMP_FROM = DATECVT(DATEADD(DATECVT(&_FROM_GREG,'I8YYMD','YYMD'), 'Y', -1), 'YYMD', 'I8YYMD'); -SET &_JUL_PREVFROM = JULDAT(&_TEMP_FROM, 'I7'); -***********************************************************************
This is the log from report caster: -SET &_FROM_GREG = GREGDT( 109091, I8YYMD ); -SET &_TEMP_FROM = DATECVT(DATEADD(DATECVT(1090401, I8YYMD , YYMD ), Y , -1), YYMD , I8YYMD ); -SET &_JUL_PREVFROM = JULDAT(19001231, I7 ); //in MR dashboard, 19001231 should've been 1080401
This job runs daily in RC. Occasionally, the date function didn't work in RC. However, it works 100% of the time when running in MR dashboard. Any inputs would be greatly appreciated.
Many thanks,This message has been edited. Last edited by: Kerry,
Shirley Huang WF 7.7.04M MRE BID DevStudio WIN2003, SQL Server 2000/DB2 HTML/PDF/EXL2k/AHTML iSM 6.16
I guess this is meant to be a julian date but what is it meant to be (value wise) 2009091? (=1st April 2009). This value is being interpretted as 1090401 as an I8YYMD value (=1st April 109) which is way off the radar and is causing the return from your DATECVT(DATEADD combo to be a zero (invalid output). This in turn is interpretted as being 0 days from the base date which is 31/12/1900.
I cannot understand why this would have ever worked with a value such as 1090401 being passed to the DATECVT function as an I8YYMD.
I would suggest re-evaluating the data you are using for dates and ensure you use full year containers (after all, that was what caused the stir for Year 2000!).
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
The problem seems to arise in getsalesdate, which apparently (judging from the reference to &LINES) uses some Define and Table and finally -READ to set the & vars. If you post it, perhaps we can spot the issue. (Perhaps a data file it references, or its .mas file, differs in RC from that accessible in Dashboard)
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I've updated the program to use 7 digit julian dates. I had to convert back to six digit julian date because that's the value in our system, which it's needed for whereclause. It's better performance this way rather than using the define field for whereclause.
Thank you all for the respond. I'll find out tomorrow if it works.
Regards,
Shirley Huang WF 7.7.04M MRE BID DevStudio WIN2003, SQL Server 2000/DB2 HTML/PDF/EXL2k/AHTML iSM 6.16