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.
We have an application that has converted the number of milliseconds into seconds and then into minutes in a day. So 600 minutes translates to 10am and 1020 minutes is 5pm (17th hour in a day. But when the number of minutes is 635 the result is 10.58 (Result/D5.2 635/60). How do I handle the remainder so that is will correctly handle the remainder?
Thanks in advance. RhondaThis message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007
I had to do the same thing for schedule times displayed in minutes past midnight. This is how I accomplished this with a DEFINE:
-SET &NOWDATE = TODAY('A10'); -SET &SCH_MINS = 635; DEFINE FILE CAR -*SCH_DTE TO EQUAL DATE SCH_DTE/MDYY=&NOWDATE; -*PLACE HOLDERS FOR HOURS AND MINS INP_HRS/I2=00; INP_MIN/I2=00; -*CREATE DATE WITH HOURS AND MINS (MM/DD/YYYY 00:00) DATE_TIME/HMDYYS=HDTTM(SCH_DTE,8,'HMDYYI'); DATE_TIME/HMDYYI=HSETPT(DATE_TIME,'HOUR',INP_HRS,8,'HMDYYI'); DATE_TIME/HMDYYI=HSETPT(DATE_TIME,'MINUTE',INP_MIN,8,'HMDYY'); -*START TIME IS MINUTES FROM MIDNIGHT SCH_ADD_MIN/I3=&SCH_MINS; -*ADD MINUTES TO DATE_TIME PLACEHOLDER SCH_START_TIME/HHI=HADD(DATE_TIME, 'MINUTE', SCH_ADD_MIN, 8, 'HHI'); END TABLE FILE CAR PRINT COUNTRY NOPRINT SCH_START_TIME END
version 7.7.03, windows 7, microsoft office 2007
Posts: 13 | Location: Minnesota | Registered: October 03, 2012
Thanks for the recommendation from both WAZ and you. However, the problem with HADD is that I do not want to add time to the value. I want to convert the number of minutes to a time of day. 635 minutes I would think equal 10:35 AM..or am I way off base?
Rhonda
WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007
What do you want your output to be? text or date/time format?
The above (the TABLE FILE CAR isn't the best table to use...but it works) produces 10:35 in a date/time format (you can change the /HHI to whatever format you want.
However, if you want Alphanumberic output you could do this:
-SET &MINS = 635; DEFINE FILE CAR TIME_HOUR/I2 = &MINS/60; TIME_MIN/I2 = IMOD(&MINS, 60, 'I2'); TIME_SE /A3 = IF TIME_HOUR GE 12 THEN ' PM' ELSE ' AM'; TIME_OF_DAY/A8 = EDIT(TIME_HOUR) | ':' | EDIT(TIME_MIN) | TIME_SE; END TABLE FILE CAR PRINT COUNTRY NOPRINT TIME_HOUR TIME_MIN TIME_SE TIME_OF_DAY END
version 7.7.03, windows 7, microsoft office 2007
Posts: 13 | Location: Minnesota | Registered: October 03, 2012
PERFECT!! Thank you all for your help and the solution that works for me. I have been so used to working with date-timestamp fields that sometimes the simple stuff eludes me.
Thanks again everyone! Rhonda
WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007
-SET &MINS = 635;
DEFINE FILE CAR
TSDUMMY/HHI = DT(00000101000000000) ;
TIME_OF_DAY/HHIA = HADD(TSDUMMY,'minutes',&MINS,&MINS.LENGTH,TIME_OF_DAY);
END
TABLE FILE CAR
PRINT
COUNTRY NOPRINT
TSDUMMY
TIME_OF_DAY
END