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     How to return records for the current month

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to return records for the current month
 Login/Join
 
<BrianS>
posted
I'm converting an Access query to WebFocus. I'm wanting the query to run every month and return the records for that month without having to manually change the dates in the Where statement. In Access we use the following statemnt

DatePart("m",Now())

Is there anything that will do the same thing for Webfocus? The only thing I've found is Today which returns data for the current day. Thanks for your help.
 
Report This Post
Virtuoso
posted Hide Post
Please add what version of WebFocus you are using on your signature line. You can do this thru your profile.

TODAY/MDYY = '&DATEMDYY';

BEG_CUR_MO/MDYY=DATEMOV(TODAY,'BOM');
END_CUR_MO/MDYY=DATEMOV(TODAY,'EOM');


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Brian

Ask your management if it is allowed to spend 25 $ for a book.
If they do, order the book at IBI. It's is called
"(Almost) 1001 Ways to Work With DATES in WEBFOCUS" isbn 978-0-9791722-1-2.

You can define an actual month based upon the actual date.

actual date is &YYMD

-SET &ACTMONTH=EDIT(&YYMD,'999999');
-TYPE &ACTMONTH

But there is more.....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Guru
posted Hide Post
I must agree with Frank, that book is pure gold. You really should get a copy.

As you can see from the responses, there are several ways to resolve your problem. Here's a quick example of how I would do it.

 
-*********************************************************************
-*  THIS QUERY WILL PULL ALL EMPLOYEES WITH AND INCREASE DATE IN 
-*  JANUARY 1982
-*********************************************************************
-* &YYDM IS THE CURRENT DATE.  FOR THIS EXERCISE THE CURRENT DATE HAS 
-* BEEN MANUALLY SET TO JANUARY 10, 1982.  TO CALCULATE THE CURRENT 
-* MONTH SIMPLY USE '-SET &MONTH = &YYMD/100;
-SET &DATE     = 19820110;
-SET &MONTH    = &DATE/100;
-*********************************************************************

DEFINE FILE EMPLOYEE
-**********************************************************************
-* SINCE DAT_INC IS AN ALPHA FIELD YOU MUST CONVERT IT TO I6 IN ORDER
-* TO COMPARE IT TO &MONTH
-**********************************************************************
INCDATEA/A6 = '19'||EDIT(DAT_INC, '9999');
INCDATE/I6 = EDIT(INCDATEA);
END

TABLE FILE EMPLOYEE
PRINT
	EMP_ID
	LAST_NAME
	FIRST_NAME
	HIRE_DATE
	DEPARTMENT
	CURR_SAL
	CURR_JOBCODE
	DAT_INC 
	INCDATE
WHERE INCDATE EQ &MONTH
END


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report 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     How to return records for the current month

Copyright © 1996-2020 Information Builders