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.
WebFOCUS functions in general, but dates in particular, are needlessly difficult to work with. You get used to them, but that does not excuse the state they're in. The simplified functions are a big improvement, but they're incomplete at the moment.
I never understood why 'smart dates' are called smart. They're anything but smart. Calls that are simple in SQL require nested function calls or multiple statements in WF, and then you still often don't get quite what you wanted. You compromise.
And some things with dates are nearly impossible to achieve in WF. Try converting a date to a week-number and a year separately and correctly(!) for all days in weeks 1 or 53 - you'll end up with the wrong year for several days in those weeks, because there is no way to specify that you want the year that the week is part of. You'll get the year that the date is in.
In SQL, you can get those with, for example: select to_char(date, 'IW') as week, to_date(date, 'IYYY') as year from ... and you'll get the correct values.
Or try getting a date in a specific output format for which WF didn't pre-define one. There are examples of that in these forums.
Having to deal with time-zone transformations in date-time values is another fun challenge. I don't think that's even possible.
Need to handle a date or a date-time in dialog manager? Good luck with that! Especially smart dates are fun, because in many cases they will work just fine, but then you get a smart date value where a byte in the date is a 0 and your fex aborts...
There is plenty of room for improvement here. For date-times, I think the standard SQL date handling functions would be a good starting point for an API. Those are smart dates that deserve that name.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Following up to my previous post, were I was thinking that the input was an incoming date-time column from a relational table..
Here is an example of reformatting a date-time, as well as, using one of the WebFOCUS date-time functions, running against one of the MS SQL Server Adventureworks sample tables..
DEFINE FILE EMPLOYEEPAYHISTORY
-* Reformat date-time to YY-Mt date-time.
RATECHANGE_YYMT/HYYMt- = RATECHANGEDATE;
-* Get the day of the week 'part' of the date-time.
DAY_OF_WEEK/I2 = HPART(RATECHANGEDATE, 'DW', 'I2');
END
-*
TABLE FILE EMPLOYEEPAYHISTORY
PRINT RATECHANGEDATE
RATECHANGE_YYMT
DAY_OF_WEEK
IF READLIMIT EQ 2
END
I don't know that I have ever experienced any of the issues Wep mentions. Time zones are not an issue for me because everything is in the same time zone. As for smart dates in Dialogue Manager, they are not a valid format. All variables in Dialogue Manager are strings. Also, if I have a field in one of our Oracle tables that is a true date/time field, I will generally have 2 entries in the master, something like this:
I don't know why IBI hasn't come up with some better solution to deal with time zones... or to even just add a timezone data type to start with. I've had a NFR in for it for I think at least a year now... probably needs another 9 years before they add support for timezones into the product.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Seems to me that time zone support would depend on how date/time fields are stored internally (in the database, focus database and flat files). I don't know that I have ever seen any documentation on that. For example, I know that some date/time field like the next run date/time are stored in Zulu format in the Report Caster Repository. Knowing that, you can always adjust, for example we are Zulu time + 6 hours.
The other issue would be day light savings time and who switches and who doesn't. I know when I lived in Louisville, Kentucky switched but Indiana didn't except for the southern counties along the Ohio River across the river from Louisville did switch.
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
the main problem is that WF doesn't even have a data type for timezone. It all starts from there. All the major databases do though. But you can't take advantage of any of that because WF has no idea what the timezone of the data element is.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013