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     [CLOSED] Converting datetime field to Month Name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Converting datetime field to Month Name
 Login/Join
 
Gold member
posted
Hello,

I am getting this error when I'm doing a COMPUTE or DEFINE field to convert a datetime field to Month name...

(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:
monthName

Here's my code:
COMPUTE MONTHSTR/MT = LOADING.LOADING.actualDate;

actualDate field is HYYMDs format.

I appreciate any help!

Thanks,

This message has been edited. Last edited by: <Kathryn Henning>,


Winnie

Webfocus 7.7.3
 
Posts: 83 | Registered: July 16, 2008Report This Post
Platinum Member
posted Hide Post
Try using HNAME function

DEFINE FILE CAR
CUR_DATE/HYYMDS = DT(&YYMD.EVAL 00:00);
CUR_MONTH/A10= HNAME(CUR_DATE ,'MONTH','A10');
END
TABLE FILE CAR
PRINT
CUR_DATE
CUR_MONTH
DCOST
RCOST
SALES
BY CAR
END


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

 
Posts: 104 | Location: Indianapolis | Registered: November 08, 2007Report This Post
Virtuoso
posted Hide Post
If you want the date in MT format use HDATE:
MONTH_DATE/MT = HDATE(LOADING.LOADING.actualDate,'MT');


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Thanks, Rao and Alan. I tried both codes...

First one: gave me error below
(FOC177) INVALID DATE CONSTANT: LOADING.LOADING.actualDate
0 ERROR AT OR NEAR LINE 145 IN PROCEDURE customer_scorecard
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: MONTH_DATE


DEFINE FILE LOADING
MONTH_DATE/HYYMDS = DT(LOADING.LOADING.actualDate);
MONTH_NAME/A10=HNAME(MONTH_DATE,'MONTH','A10');
END

Second code: it's showing each month of the year even though the values of LOADING.LOADING.actualDate is not equivalent to the actual month.

MONTH_DATE/MT = HDATE(LOADING.LOADING.actualDate,'MT');


Winnie

Webfocus 7.7.3
 
Posts: 83 | Registered: July 16, 2008Report 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     [CLOSED] Converting datetime field to Month Name

Copyright © 1996-2020 Information Builders