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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Printing Year
 Login/Join
 
Silver Member
posted
Hi,
Can somebody tell me how to retrieve and display just the year from the date field. The data is coming from Oracle.

Thanks for the help
 
Posts: 30 | Registered: September 21, 2004Report This Post
Virtuoso
posted Hide Post
Displaying year:

You might try a compute or define where TODAYS is your oracle date.

TODAYY/YY = TODAYS;
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
I have tried that in a define
TransactionYear/YY = LOCL_TRAN_DATE; where LOCL_TRAN_DATE is the date field from oracle.
But I am getting this error:
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: TransactionYear
Also I need the 4-digit year
 
Posts: 30 | Registered: September 21, 2004Report This Post
Virtuoso
posted Hide Post
How is LOCL_TRAN_DATE declared in the MFD?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
you might try:

CDATE/YY = HDATE(CYCLE_D,'YY') ;

where CYCLE_D is the Oracle data column name, if you are getting the date from SQL passthrough or whatever.

hth,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Silver Member
posted Hide Post
LOCL_TRAN_DATE is defined as HYYMDS.
I have already done one convertion to remove the time part with this command:
TransactionDate/MDYY= HDATE( LOCL_TRAN_DATE ,'MDYY' );
 
Posts: 30 | Registered: September 21, 2004Report This Post
Virtuoso
posted Hide Post
My experience is with DB2 fields and if I put in the

TransactionYear/YY = BIRTH_DT;

Against one of tables I get the year just fine when printed. So is it a 'smart date'?

This is under WebFOCUS 5.3.3
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
What happens if
I have already done one convertion to remove the time part with this command:
TransactionDate/MDYY= HDATE( LOCL_TRAN_DATE ,'MDYY' );

is changed to
I have already done one convertion to remove the time part with this command:
TransactionDate/MDYY= HDATE( LOCL_TRAN_DATE ,'YYMD' );
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
since you already have a smart date field defined with the date you could:

TRAN_YEAR/YY = TransactionDate;

hth,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Silver Member
posted Hide Post
That worked Drew !

Thanks
 
Posts: 30 | Registered: September 21, 2004Report This Post
Guru
posted Hide Post
I just spotted this on the Education Web Site ...

eLearning Seminar on the Date/Time datatype.

http://education.informationbuilders.com/jsp/edu/e_courseCatalog.jsp.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
Drew,
Thanks your input helped me fix my problem too.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders