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     Help with date check in maintain 5.3.2

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Help with date check in maintain 5.3.2
 Login/Join
 
Member
posted
I need to test the date AND TIME if that is possible. Here's the code I have now:

Compute TodayDate/MDYY;
AppFlag/A4;
CALL GETDATE FROM TodayDate AppFlag INTO TodayDate AppFlag

Winform Show_Inactive Welcome
Winform Set Welcome.Text19.visible To NO

Compute TodayDate = '12272006';

...

case Go_To_Main_Menu
IF TodayDate LT '12292006'

CALL AJE100
ELSE
IF TodayDate LT '01022007'
BEGIN
Winform Close Welcome
GOTO Exit
ENDBEGIN
ELSE
CALL AJE100
endcase

I want to say if TodayDate LT '12282006 16:00'...

The examples in the help are not on point, and I wonder if this is supported in 5.3.2. I hard-code the date for testing, but ultimately I want to use the system date/time.

Thanks for any suggestions - this forum has been very helpful in the past.

Mike


Mike Anderson
 
Posts: 14 | Location: Columbus, Ohio | Registered: May 20, 2003Report This Post
Master
posted Hide Post
Good Morning Mike
Maintain allows for the use of DATE / TIME fields. You can use them for this code. Here is a simple example:

MAINTAIN
COMPUTE WHEN1/HYYMDI = HGETC(28, WHEN1);
COMPUTE WHEN2/HYYMDI = '2006/12/12 12:00';
IF WHEN1 EQ WHEN2 THEN TYPE "EQUAL"
IF WHEN1 GT WHEN2 THEN TYPE "GREATER THAN"
IF WHEN1 LT WHEN2 THEN TYPE "LESS THAN"
TYPE "<TYPE "<END

The HGETC function returns the current date and time. In my example, I am using two variables. Maintain has no problem with comparing the two variables. However, you cannot do this:

IF WHEN1 EQ '2006/12/13 12:00' THEN TYPE "EQUAL"

This statement yields an error. So, always equate the value to a variable and you'll be fine.

Mark Derwin
 
Posts: 663 | Location: New York | Registered: May 08, 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     Help with date check in maintain 5.3.2

Copyright © 1996-2020 Information Builders