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] Determining if a date is between dates

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Determining if a date is between dates
 Login/Join
 
Silver Member
posted
I am trying to determine if a date is between today's date and 30 days in the future

I have set up a define for today's date and then 30 days in the future
Today/yymd ='&DATEYYMD'
futuredate/yymd = DATEADD('DATEYYMD','D',30)

I am not sure about how to determine this.

This message has been edited. Last edited by: <Kathryn Henning>,


8.1.0.4
Windows 7
Excel, AHTML, HTML,PDF
 
Posts: 41 | Location: North Carolina | Registered: September 14, 2012Report This Post
Virtuoso
posted Hide Post
Normally, if all your fields are on the same date format you can just do:

WHERE TestDate GT Today;
WHERE TestDate LT FutureDate;

Or
DEFINE FILE CAR
TestDate1/YYMD = '20150221';
TestDate2/YYMD = '20150401';
Today/YYMD ='&DATEYYMD';
FutureDate/YYMD = DATEADD('&DATEYYMD','D',30);
IsBetweenY /I1 = IF TestDate1 GT Today AND TestDate1 LT FutureDate THEN 1 ELSE 0;
IsBetweenN /I1 = IF TestDate2 GT Today AND TestDate2 LT FutureDate THEN 1 ELSE 0;
END
TABLE FILE CAR
PRINT Today
      FutureDate
      TestDate1
      TestDate2
      IsBetweenY
      IsBetweenN
BY COUNTRY
WHERE READLIMIT EQ 1;
WHERE RECORDLIMIT EQ 1;
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
You can also DATEDIF funtion to find number of days between test date and today. If it is between 0 and 30, then YES else NO.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Virtuoso
posted Hide Post
WHERE date FROM today TO futuredate;


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
You really should get a copy of the ebook 1001 Ways to Work with Dates in WebFOCUS. This great PDF covers all of those pesky date problems.

Good luck.
Vivian
www.aviter.com


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report 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] Determining if a date is between dates

Copyright © 1996-2020 Information Builders