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     [SOLVED] Statement for Late and Late by 60 Minutes Recognition

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Statement for Late and Late by 60 Minutes Recognition
 Login/Join
 
Member
posted
I am trying to write an if statement with 2 conditions.... one of them being if it has been longer than 60 minutes and the other condition is that it is "late". Example, I am trying to determine when shipments are late over an hour but I don't want it to count when shipments are early, just when they are late. Here is the equation I had originally buts its counting when shipments are greater than 60 minutes early as well:

IF HDIFF ( SHIPMENT_INDIVIDUAL_MOVE_COSTING.LOAD_DATE_FIELDS.SL_LD_DROP_ACTUAL_DATE , SHIPMENT_INDIVIDUAL_MOVE_COSTING.LOAD_DATE_FIELDS.SL_LD_DROP_APPT_START_DATE , 'Minute' , 'D6' ) GT 60 THEN 1 ELSE 0

Any assistance or thoughts are appreciated.... I feel stuck

This message has been edited. Last edited by: FP Mod Chuck,


Agree
 
Posts: 4 | Registered: November 02, 2020Report This Post
Virtuoso
posted Hide Post
Stacy

Is this IF part of a DEFINE? Also how do you detect Early from Late is that another field?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Compare using an HADD instead. I don't fully understand your fields and logic, but the pseudo-code would be like this --

If HADD(Start_Date, 'Minutes', 60) < Actual_Date THEN 1 ELSE 0;

That is, if the start date plus 60 minutes is still less than the delivery date, it's late.

I don't have a WF manual available, so that's an estimate of what the HADD function looks like!

This message has been edited. Last edited by: John_Edwards,



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Guru
posted Hide Post
Your Function is OK, although I would use the simplified DTDIFF(SL_LD_DROP_ACTUAL_DATE , SL_LD_DROP_APPT_START_DATE , MINUTE) instead to optimize SQL. 60 min early would be -60 so that wouldn't pass your GT 60 condition.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Member
posted Hide Post
This is part of a define. I am currently not detecting early from late in another field. I can physically look and see if something is early or late from the dates shown but I do not have an equation setup (other than the one I wrote above) that detects early vs late.


Agree
 
Posts: 4 | Registered: November 02, 2020Report This Post
Member
posted Hide Post
quote:
Originally posted by John_Edwards:
Compare using an HADD instead. I don't fully understand your fields and logic, but the pseudo-code would be like this --

If HADD(Start_Date, 'Minutes', 60) < Actual_Date THEN 1 ELSE 0;

That is, if the start date plus 60 minutes is still less than the delivery date, it's late.

I don't have a WF manual available, so that's an estimate of what the HADD function looks like!



I will give this a try thank you!


Agree
 
Posts: 4 | Registered: November 02, 2020Report This Post
Member
posted Hide Post
quote:
Originally posted by Frans:
Your Function is OK, although I would use the simplified DTDIFF(SL_LD_DROP_ACTUAL_DATE , SL_LD_DROP_APPT_START_DATE , MINUTE) instead to optimize SQL. 60 min early would be -60 so that wouldn't pass your GT 60 condition.


Thank you! I will give this a try!


Agree
 
Posts: 4 | Registered: November 02, 2020Report 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     [SOLVED] Statement for Late and Late by 60 Minutes Recognition

Copyright © 1996-2020 Information Builders