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.
Can a date formatted for example (2007070400) be converted to 2007/07/04? The two zeros at the end need to be parsed out. I can't find examples on this. Thanks for any help.
I believe the "Using Functions" book is also available via download for registered users, but I have a printed copy (to read in my spare time. Also serves as a nice desk decoration. I keep it in a very "reachable" spot.)
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, 2007
Actually, the date field in question - event_partkey is originally formatted as I11. I tried NEWYMD/I8YYMD = EDIT(EVENT_PARTKEY,'99999999'); and received a format error. Should I redefine the metadata as A10 and not as an integer.
NEWADATE/A11=EDIT(ORIGINAL); is converting from Integer to alpha.
NEWYMD/A10=EDIT(NEWADATE,'99/99/9999$$'); is masking the alpha string to the format you want, but keep in mind this is only a date looking string and not a real smart date.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
If the orginal date is I11, to convert to smart date use the following in a DEFINE:
FMTDT/YYMD=DATECVT(ORIG_DT/1000,'I8YYMD','YYMD');
For example: DEFINE FILE MACGYVER ORIG_DT/I11=20071231000; FMTDT/YYMD=DATECVT(ORIG_DT/1000,'I8YYMD','YYMD'); END TABLE FILE MACGYVER PRINT ORIG_DT FMTDT WHERE COUNTER EQ 1 END
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
DEFINE FILE CAR
IDATE/I11 = 2007070400;
IDATE1/I8YYMD = IDATE/100;
IDATE_YYMD/YYMD = IDATE1;
END
TABLE FILE CAR
PRINT IDATE IDATE1 IDATE_YYMD
BY COUNTRY
END
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003
That's what baffled me too. I did not see a space in the first character until I ran test data. I'll try your suggestion and let you know how it works.