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] Compare Date in report to Current Date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Compare Date in report to Current Date
 Login/Join
 
Gold member
posted
I want to highlight the dates in a report that are in the past. How do I compare these dates?

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


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 2010Report This Post
Virtuoso
posted Hide Post
First, the documentation is full or references and functions regarding dates. This forum is as well. Search through those for additional information. Second, &YYMD (and its variations) is the reference to the system date. It can be used in DEFINE/COMPUTE statements, WHERE statements, etc.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
Well this is what I have been trying.
  
COMPUTE CURR_DATE/MDYY='&DATEMDYY'; NOPRINT
COMPUTE PASS_EXPIRED/MDYY=PWD_EXPIRY_DT; NOPRINT
COMPUTE SHOWEXPIRED/A1=IF PASS_EXPIRED LT CURR_DATE THEN 'Y' ELSE 'N'; NOPRINT


And I'm just getting this error.
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:
PASS_EXPIRED


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 2010Report This Post
Virtuoso
posted Hide Post
What is the format of PWD_EXPIRY_DT to begin with?

Take of your noprint and the last compute and that is probably where you are really getting the error. You probably need a function to make it really MDYY
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
See if this helps.

DATE_CREATED is in a date format.

-SET &TODAY = &YYMD;
-SET &TDAY = AYMD (&TODAY, 0, 'I8YYMD');

COMPUTE DATE_CREATED1/I8YYMD = DATE_CREATED;
COMPUTE DATE_CHECK/A1 = IF &TDAY LT DATE_CREATED1 THEN 'Y' ELSE 'N';


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Virtuoso
posted Hide Post
I don't think you can compare ddates in smart date format using LT, GT, etc. If you convert to alpha, it would have to be A8YYMD to compare. I think Spence's suggestion would get you what you need (he's using I8YYMD which you could use for numeric comparison operators.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Master
posted Hide Post
I have this in the define of a program that does something similar:

NEWTIME/HYYMDIA WITH TODATE=DT(&YYMD 00:00AM);
NEWDAY/HYYMDS = NEWTIME;

PASSED/A1 = IF NEWDAY FROM FROMDATE TO TODATE THEN 'Y' ELSE 'N';

-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Gold member
posted Hide Post
Thank you Spence that works!


WebFOCUS 8.0.08
Solaris
HTML, PDF, XLS, CSV
 
Posts: 55 | Registered: September 08, 2010Report 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] Compare Date in report to Current Date

Copyright © 1996-2020 Information Builders