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] Concatenating the year and month

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Concatenating the year and month
 Login/Join
 
Member
posted
Hi ,

I stuck up in concatinating the year and the month fields.
I do have a filed contains the year and an another field with month.

I need to concatenate it in to a single filed.
Please do let me know your suggestions.



Thanks

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


Webfocus 7.6.8
Windows
PDF & Excel
 
Posts: 7 | Registered: September 27, 2009Report This Post
Expert
posted Hide Post
What are the format of the two fields?


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
Virtuoso
posted Hide Post
are this numeric fields?

what did you try




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
Member
posted Hide Post
Year field format is yy and month field format is mm.

Thanks


Webfocus 7.6.8
Windows
PDF & Excel
 
Posts: 7 | Registered: September 27, 2009Report This Post
Guru
posted Hide Post
You may wish to consider the use of DEFINE; follow the link in the upper right corner for TechDoc. Or use the help feature in WebFOCUS. Look for 'concatentae' or 'concatentation.'


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
so both fields are smartdate fields?

if so did you try just this

NEWDATE/YYM=YEARDATE;




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
Expert
posted Hide Post
quote:
Year field format is yy and month field format is mm.

What is the WebFOCUS format? "mm" is not a valid format.


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
Hi Francis,

Here is the code that I tried.
I got the year and month.
I am trying to concatenate YEAR and MONTH fields.


-MRNOEDIT BEGIN
TABLE FILE EMPLOYEE
PRINT
HIRE_DATE
-*COMPUTE DATE1/YYMD=HIRE_DATE; NOPRINT
-*COMPUTE DATE_FINAL/YYMD=DATEADD(DATE1,'M',-3);
COMPUTE YEAR/YY=HIRE_DATE;
COMPUTE MONTH/M=HIRE_DATE;
-*COMPUTE YEARMONTH/YYM=YEAR|'/'|MONTH;
END
-MRNOEDIT END


Thanks
Ani


Webfocus 7.6.8
Windows
PDF & Excel
 
Posts: 7 | Registered: September 27, 2009Report This Post
Guru
posted Hide Post
The statement, COMPUTE YEARMONTH/YYM=YEAR|'/'|MONTH, tells WebFOCUS that the variable is a so-called Smart date. It would appear that you want a character string like the following:
YEARMONTH/A7 = YEAR | '/' | MONTH;
Note the difference in format.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Expert
posted Hide Post
WebFOCUS 101:

  
TABLE FILE EMPLOYEE
PRINT
HIRE_DATE
-*COMPUTE DATE1/YYMD=HIRE_DATE; NOPRINT
-*COMPUTE DATE_FINAL/YYMD=DATEADD(DATE1,'M',-3);
COMPUTE YEAR/YY=HIRE_DATE; 
COMPUTE YEAR1/A4YY = EDIT(YEAR);
COMPUTE MONTH/M=HIRE_DATE; 
COMPUTE MONTH1/A2 = EDIT(MONTH);
COMPUTE YEARMONTH/A7=YEAR1 |'/'| MONTH1;
END


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
or even simpler still (forget about concatenating - just use the date):
TABLE FILE EMPLOYEE
PRINT
HIRE_DATE
COMPUTE NDATE1/YYM=HIRE_DATE;
COMPUTE NDATE2/A6YYM=NDATE1;
COMPUTE NDATE3/A7=EDIT(NDATE2,'9999/99');
END


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
Member
posted Hide Post
Hi Darin,

It worked out thanks.


Thanks & Regards
Ani


Webfocus 7.6.8
Windows
PDF & Excel
 
Posts: 7 | Registered: September 27, 2009Report 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] Concatenating the year and month

Copyright © 1996-2020 Information Builders