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] Date calc / skipping weekends

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Date calc / skipping weekends
 Login/Join
 
Member
posted
I'm just back into WebFocus after a hiatus of several years. It's coming back slowly but surely, but I'm having quite a time trying to sort this problem out. I have two date fields that are usually the same date, but sometimes there is a span between the two. (The dates are both HYYMDs in the master and I've DEFINEd them to YYMD within the master.)

I need to calculate the number of days between the two dates, but I also need to bypass weekends. So if the first date is a Thursday, and the second date is Tuesday, the result would be 3 (Friday, Monday, Tuesday). I'm totally stumped... if anyone has any ideas I'd greatly appreciate it.

LV

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


WebFocus 7.1
Windows server 2003
all output
 
Posts: 5 | Registered: October 19, 2009Report This Post
Expert
posted Hide Post
Do a forum search on BUSDAYS or business days. There are lots of examples.

Do this check:
? SET BUSDAYS
The default is Monday through Friday.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
The DATEDEIF function should provide what you're looking for, if you use Weekday as the difference unit.

Docs: DATEDIF


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
Member
posted Hide Post
Perfect... the DATEDIF gave me exactly what I needed. That must be a new function, I don't remember it from my old days.

Thank you so much!!


WebFocus 7.1
Windows server 2003
all output
 
Posts: 5 | Registered: October 19, 2009Report This Post
Expert
posted Hide Post
DATEDIF has been around since at least v5.3, which began life in the last millennium Smiler


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
Master
posted Hide Post
And you can set up a Holiday file as well and DATEDIF along with other DATE routines will take holidays into account as well if you are doing Business Days.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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] Date calc / skipping weekends

Copyright © 1996-2020 Information Builders