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.
There is a very good book available for 25 U$. It's called "(Almost) 101 Ways to Work With DATES in WebFOCUS" ISBN978-0-9791722-1-2 You can order it ad Information Builders.
How to convert your date time field depends on many things. If this date in fact is an alpha string, you can handle it as an alpha sting and split it. If this is only a way to present the date and in the database it is in fact a number, you van use that number.
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 your string is a display of a data base date-time stamp, just use the HDATE function. If you are using DevStudion, you can find all the info on all the functions under Help.
If it is really a string and you want to sort on the date, I would recommend converting it to a smart date. You will have to use a variety of functions. For example, here's one way:
DEFINE FILE CAR
INPUT_DT/A42='Friday, January 18, 2008 10:00:03 PM EST';
TESTMD/A12=UPCASE(12,EDIT(GETTOK(INPUT_DT,42,2,',',13,'A13'),'$999999999999'),'A12');
TESTMT/A3=EDIT(TESTMD,'999');
TESTM/A2=DECODE TESTMT(JAN 01 FEB 02 MAR 03 APR 04 MAY 05 JUN 06 JUL 07
AUG 08 SEP 09 OCT 10 NOV 11 ELSE 12);
TESTD/A2=GETTOK(TESTMD,12,2,' ',2,'A2');
TESTYY/A4=EDIT(GETTOK(INPUT_,42,3,',',5,'A5'),'$9999');
TESTYYMD/YYMD=DATECVT(TESTYY|TESTM|TESTD,'A8YYMD','YYMD');
END
-*
TABLE FILE CAR
PRINT INPUT_DT TESTMD TESTMT TESTM TESTD TESTYY TESTYYMD
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
END
yields:
PAGE 1
INPUT_DT TESTMD TESTMT TESTM TESTD TESTYY TESTYYMD
---------------------------------------- ---------- ------ ----- ----- ------ ----------
Friday, January 18, 2008 10:00:03 PM EST JANUARY 18 JAN 01 18 2008 2008/01/18
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
Jgelona, Thanks so much as well. I have exactly the same method as far as using gettok and getting day and month etc. I was also thinking of decoding the month like you are doing it here, so I am on the right direction. Thanks for the last datecvt function. This is exactly what I want. Thankssssss so much. so that with that converted date, I can do the where statement on it.
KK
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
If you are using a date in a WHERE statement, consider the DT(date-time stamp) expression; something like WHERE DATE-TIME in data GE DT(DATE-TIME ARGUMENT).
And I concur with the recommendations re Almost 1001 Ways
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003