Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Time Difference 24 Hour Clock

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Time Difference 24 Hour Clock
 Login/Join
 
Silver Member
posted
Hi

I am looking to calculate the time difference between a start and an end time. It works ok, but not so much when the times expand over midnight (for example, my start time is 11:30pm, and end time is 12:15am the next day), my length should be 45 minutes but instead is a negative number. Is there a way I can account for this?

I only have the 2 time stamps and did the following define:

Start_time/HHIA =HINPUT(12,'00000000' | FACT_OR.FACT_OR.START_TIME,8,'HHI') ;

End_time/HHIA =HINPUT(12,'00000000' | FACT_OR.FACT_OR.END_TIME,8,'HHI') ;

Length/D12.2 = HDIFF(FACT_OR.FACT_OR.End_time, FACT_OR.FACT_OR.Start_time, 'MINUTE', 'D9');

This message has been edited. Last edited by: <Emily McAllister>,


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Expert
posted Hide Post
Does START_TIME not have a date portion?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
Hi

I do have a date field that I did not use, but it would only apply to the start date as that date field shows just the date for the start time, I do not have an "end date" field for the end time


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Expert
posted Hide Post
Have you searched on "time difference"?

Lot's of posts going way back to 2005 that will give you lot's of ideas and knowledge on how to achieve this.

Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
quote:
I do not have an "end date" field for the end time


If you don't have the END DATE/TIME how would you know if the end was the next day at 12:30AM or next month? Are there assumptions you can make about how long the difference can be?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Silver Member
posted Hide Post
Hi,

Yes it is safe to assume none of the times would be beyond the next day for example the next month, all the lengths are within 3-4 hours of each other. So pretty much...this is only applying to anything that was in the late 20s of the 24 hour clock for the start time and then the 0 or 1 hours for the end time


8.0.0.2
Windows, All Outputs
 
Posts: 41 | Registered: February 27, 2014Report This Post
Guru
posted Hide Post
Hi,

Have you tried checking to see if the end time is less than the begin time ? If yes add 1440 minutes to the end time and calculate the difference.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Time Difference 24 Hour Clock

Copyright © 1996-2020 Information Builders