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.
I am trying to get the week number, or even ISO date. The original field was in Julian (YYYYDDD) format. I have that converted it to Gregorian (YYMD) format. Using the 'Help' section in Dev Studio, I found the section on HYYWD. COMPUTE ISODATE/A10 = HYYWD(TRANSDATE, 'A10'); COMPUTE WEEK/A2 = EDIT(ISODATE, '$$$$$$99$$'); I've tried using EDIT to edit the format of my date from YYMD to HYYWD, but that's not working at all. I was thinking about concatenating a time on the end of my date, but there should be a way to convert using just the date without a time. Help!This message has been edited. Last edited by: Kerry,
WebFOCUS 768 OS/400 HTML, also quite a few active reports and excel.
From what I recall to work with weeks its best to use a DateTime calculation. I believe the -SET WEEKFIRST only works with the DateTime functions. You can control what day is the start of the week and IIR they have recently fixed some of the ISO discrepancies with it. Now there is 1-7 and ISO1-ISO7.
DOWK AND DOWK returns the day of week and I believe Amber is looking for the actual week number of the year.
Amber, I changed my code to include moving from an INT date to datetime, then from datetime to week number.
If your going to be working with dates I would recommend getting familiar with DATECVT if you are not already. It has to be my most used function when working with dates.
Also, just curious. I see your on OS/400, what is the source (application) of your original date field?
Thanks for the heads up on the DOW thing Trob, I removed it...
Keep in mind that these COMPUTEs (Posted Thu Jun 18 2009 16:00) are based on week one being the first FULL week of the year. Check it out with the EMPLOYEE file / HIRE_DATE and see what week Richard Smith was hired (Monday 01/04/1982). This says Week One, based on the first full week in 1982. 1/1/1982 is Friday of the previous week. I've been at places that required that week one was based on the first day of the year. If so, some trickery may be required. The code which shows this is available.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Originally posted by Doug: Thanks for the heads up on the DOW thing Trob, I removed it...
Keep in mind that these COMPUTEs (Posted Thu Jun 18 2009 16:00) are based on week one being the first FULL week of the year. Check it out with the EMPLOYEE file / HIRE_DATE and see what week Richard Smith was hired (Monday 01/04/1982). This says Week One, based on the first full week in 1982. 1/1/1982 is Friday of the previous week. I've been at places that required that week one was based on the first day of the year. If so, some trickery may be required. The code which shows this is available.
Nice point Doug. This is why they added the ISO1-ISO7. About a year and a half ago when I wanted to use ISO for week number it was broken but now its fixed. ISO 8601 standard week numbering defines the first week of the year as the first week in January with four or more days. It use to only work for the first week in January with seven days. That always made every day of week one a January date. With ISO week 1 can contain the last three days of December. Coding around that sucked at the time. Thank you IBI!
ISO is a synonym for ISO2 which is the ISO standard which establishes Monday as the first day of the week.
Ok. I was just wondering because we are on JDEdwards and all the dating in a modified julian format. Prior to Y2K fixes date fields were YYDDD however now it uses CYYDDD. C is 0 for years before 2000 and 1 for 2000 through 2099. Today is 109170.
Having to handle dates so often I found it well worth it to create a function on the server "JDETOSD()", which I pass it a JDE Julian Date and it returns a SmartDate.