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 with slashes (01/01/2009) vs Date with out (01092009)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Date with slashes (01/01/2009) vs Date with out (01092009)
 Login/Join
 
Platinum Member
posted
We had to change the date format in order do some calculations.

 -* DEFINE BEGIN SDATE
SDATE/A8MDYY = EDIT (  PS_KV_PNCH_ANA_VW.PS_KV_PNCH_ANA_VW.PUNCHDATE , '99$99$9999' );
-* DEFINE END SDATE
-* DEFINE BEGIN SDATE2
SDATE2/MDYY = SDATE;
-* DEFINE END SDATE2 


Now that the parameter wants the date like this: 01012009

The javascript calendar added in html composer is no longer able to correctly populate the date fields as 01012009 is not one of the choices. The closes it has is 01/01/2009.

If the date fields are populated with the calender js they contain 01/01/2009 (slashes) and the report returns no data.

Is there a way to keep the date 01012009 format and still use the calendar js?

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


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Virtuoso
posted Hide Post
Just do a -SET at the beginning of your procedure with an EDIT to remove the slashes from the &variable. Probably several other ways as well.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
quote:
Is there a way to keep the date 01012009 format and still use the calendar js?

How about thinking of it the other way around, keep the js as it is, with the slashes and just remove them in the WebFOCUS report? What do you mean "Now that the parameter wants the date like this: 01012009"? If the parameter passed from the launch page contains slashes, just remove them with Dialogue Manager:

-DEFAULT &DATE1 = '01/01/2009';

-SET &DATE1N = EDIT(&DATE1,'99$99$9999');

-TYPE &DATE1 &DATE1N

Use the corrected date variable in the report instead of the variable passed by the launch page.


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
Platinum Member
posted Hide Post
Im close..

I added
-DEFAULT &START_DATE = '01/01/2009';
-SET &START_DATEN = EDIT(START_DATE, '99$99$9999');
-TYPE &START_DATE &START_DATEN
-DEFAULT &END_DATE = '06/30/2009';
-SET &END_DATEN = EDIT(END_DATE, '99$99$9999');
-TYPE &END_DATE &END_DATEN  


to the fex and now the start date will accept slashes. But the report still fails if the end date has slashes.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Virtuoso
posted Hide Post
Does "Fails" mean it returns errors, or it is not returning the expected data? We would probably need to see how you use the &vars in your selection criteria and also know the actual format of the fields to which you are comparing those values in order to help you further.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Also (just noticed) that you are referencing field names in your -SET statements, which will not work. They must be &variable names:

-SET &START_DATEN = EDIT(&START_DATE, '99$99$9999');
-SET &END_DATEN = EDIT(&END_DATE, '99$99$9999');


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Darin Lee:
Does "Fails" mean it returns errors, or it is not returning the expected data? We would probably need to see how you use the &vars in your selection criteria and also know the actual format of the fields to which you are comparing those values in order to help you further.


The report runs but it is empty as there are no date parameters.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Darin Lee:
Also (just noticed) that you are referencing field names in your -SET statements, which will not work. They must be &variable names:

-SET &START_DATEN = EDIT(&START_DATE, '99$99$9999');
-SET &END_DATEN = EDIT(&END_DATE, '99$99$9999');


That was it, its working.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
Greg, I certainly hope there's an open WebFOCUS manual close at hand...


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
  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 with slashes (01/01/2009) vs Date with out (01092009)

Copyright © 1996-2020 Information Builders