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.
Hi Gagan, The following maybe one of the way to extract the month and year from date-time component.
DEFINE FILE CAR DATE/HYYMDS WITH CAR= HGETC(10,'HYYMDS'); TRANSDATE_DATE/YYMD = HDATE(DATE, 'YYMD'); YEAR/YY=TRANSDATE_DATE; MONTH/M=TRANSDATE_DATE; END TABLE FILE CAR PRINT DATE TRANSDATE_DATE MONTH YEAR BY TOP 1 CAR NOPRINT END
HDATE converts date-time value to date format.
OR you can use FPRINT and EDIT functions,FPRINT converts date to alphanumeric and EDIT can mask unwanted values.
DEFINE FILE CAR DATE/HYYMDS= HGETC(10,'HYYMDS'); ALPHA_DATE/A10= FPRINT(DATE,'HYYMDS','A10'); YEAR/A4=EDIT(ALPHA_DATE,'9999$$$$$$'); MONTH/A2=EDIT(ALPHA_DATE,'$$$$$99$$$'); END TABLE FILE CAR PRINT DATE MONTH YEAR BY TOP 1 CAR NOPRINT ENDThis message has been edited. Last edited by: Darshan Patil,
Posts: 10 | Location: Bangalore | Registered: July 31, 2018
Below should also work with smartdate DEFINE FILE abc -* numeric year THE_YEAR /YY = YourDateField; -* numeric month THE_MM /MONTH = YourDateField; -* Alpha long month mixed case THE_Month /Mtr = YourDateField; -* Alpha long month upper case THE_MONTH /MTR = YourDateField; -* Alpha short month mixed case THE_Mth /Mt = YourDateField; -* Alpha short month upper case THE_MTH /MT = YourDateField; END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
@Gagan Marwah....this is the easiest and best way .....
quote:
Originally posted by MartinY: Below should also work with smartdate DEFINE FILE abc -* numeric year THE_YEAR /YY = YourDateField; -* numeric month THE_MM /MONTH = YourDateField; -* Alpha long month mixed case THE_Month /Mtr = YourDateField; -* Alpha long month upper case THE_MONTH /MTR = YourDateField; -* Alpha short month mixed case THE_Mth /Mt = YourDateField; -* Alpha short month upper case THE_MTH /MT = YourDateField; END