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.
... Being FECH the date field retrieved from my ORACLE PL/SQL query and FECHA the name of the field I'll print to the DBF file. Al that code has been tested (obviusly without the -* ) on a DEFINE and then using PRINT on my DBF.
When I open the DBF on MS Access I get a Numeric field on the DBF on most of the cases and on some of them I get an error data type.
The date can also be read on the &wf_fchref string parameter, it's a constant value on the fex.
So, can anyone tell me how to print the date from FECH or &wf_fchref into the DBF please?
Thanks!This message has been edited. Last edited by: <José Andrés Vargas Aguilar>,
Maybe I wasn't clear enough. &wf_fchref isn't today's date. It's a string that my report gets when getting called and that represents the date I use to retrieve data on a SQL.
On the DBF It must be "PRINTED" as a Date. The code you gave prints a Text. This is the adaptation of your code:
-DEFAULT &wf_fchref = '05-01-2010';
-SET FECFILE = 'testing' ;
-SET FECFILEO= 'testing' | '.DBF';
-SET papp = 'cachebw';
-SET pdire = &APPROOT;
DEFINE FILE CAR
DTTM1/HYYMDS = DT(&wf_fchref 00:00:00.000);
BTN/A500='Download file here: <a href=''/approot/&papp/&FECFILE''>&FECFILE</a>';
END
TABLE FILE CAR
PRINT
DTTM1 AS 'DATE'
COUNTRY
ON TABLE HOLD AS &FECFILE FORMAT DBASE
END
-RUN
-TYPE &FECFILEO
-TYPE &FECFILE
-SET &pfdele = &pdire | '\' | &papp | '\' | &FECFILEO;
-SET &pfcopy = &pdire | '\' | &papp | '\' | &FECFILE;
-TYPE Archivo a Borrar &pfdele
-TYPE Archivo a Copiar &pfcopy
-WINNT DEL &pfcopy
-WINNT COPY &pfdele &pfcopy
TABLE FILE CAR
PRINT
DTTM1 AS 'DATE'
COUNTRY
HEADING
"<BTN"
END
"On the DBF It must be "PRINTED" as a Date" - Perhaps WebFOCUS cannot create a Date-Time field for DBF or DBASE. None of my attempts below produce a Date column in MS Access.
-DEFAULT &WF_FCHREF = '05-01-2010';
-SET &WF_FCHREF1 = EDIT(&WF_FCHREF,'99$99$9999');
-SET FECFILE = 'TESTING' ;
APP HOLDDATA TEST
-RUN
DEFINE FILE CAR
DTTM1/HYYMDS = DT(&WF_FCHREF 00:00:00.000);
DTTM2/A20 = HCNVRT(DTTM1, '(H17)', 17, 'A20');
DTTM3/A20 = HCNVRT(DTTM1, '(HYYMDS)', 20, 'A20');
DT1/DMYY = DATECVT(&WF_FCHREF1, 'I8DMYY', 'DMYY');
DT2/A10 = EDIT('&WF_FCHREF1','99/99/9999');
DT3/A8DMYY = EDIT('&WF_FCHREF1','99999999');
END
TABLE FILE CAR
PRINT
DTTM1
DTTM2
DTTM3
DT1
DT2
DT3
COUNTRY
ON TABLE HOLD AS &FECFILE FORMAT DBASE
END
-RUN
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