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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
It took me 45 minutes to figure this out, but here is what I had to do:
The date I wanted to extract the month from was in an HYYMDS format. I'll call it BEGIN_DATE. I had to use HDATE to get it in a usable format. Then I simply used that field to populate a new field that had the format of M.
I always joke that WebFocus is great for giving us easy ways of doing hard things, but the easy things are hard to do. Dates are a perfect example. I have to refer to the documentation every single time I have to do anything with a date field. That said, it always works out ok in the end.
Originally posted by Mike in DeLand: I have to refer to the documentation every single time I have to do anything with a date field.
I have to refer to this forum every single time I have to do anything with a date field. The IBI documentation and the infamous 3rd party book dedicated to WebFOCUS dates just muddies the date waters even more, in my opinion.
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
Referring back to another ongoing thread about week numbers (assuming ISO8601 weeks here): Unfortunately these functions do provide an incantation to get the week number of the year, but they lack the ability to tell what year that week belongs to.
For example, January 1st would correctly return week 53 for those weeks that started in December in the previous year, but it would return this year with that week number instead of last year. That's a bit nasty because there are only a couple of weeks per year that you can find out that you made that mistake! And it doesn't happen every year either, this year being a good example.
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 :