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] Sorting of Month-YY

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Sorting of Month-YY
 Login/Join
 
Member
posted
Hi,I have a column in the format of Mon-YY and i need to sort this column.I tried using
conversion of Alpha numeric to Date also with HDATe but in vain.can anyone please help me on this

And my o/p column will has always 12 months and it wil dynamicaly cahneg based on the entered Mon-YY.

Eg: Mar-09 Feb-10

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


WebFOCUS 7.6.4
Windows
Excel, PDF, HTML
 
Posts: 7 | Registered: June 04, 2009Report This Post
Virtuoso
posted Hide Post
Is the column a smart date format? (like MYY) That's the only way you'll get it to sort correctly. It appears that it is just and alpha representation. HDATE is used for date/time stamps. There is no existing "conversion" from the format you specify (Mar-09) to a smart date. You best best is to use the EDIT and/or DECODE functions:
MTH_TXT/A3=EDIT(MTH_YR_FIELD,'999');
MTH_NUM/A02=DECODE MTH_TXT('Jan' '01' 'Feb' '02'.... );
MTH_YR/A4MY=MTH_NUM | EDIT(MTH_YR_FIELD,'$$$$99');


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
Expert
posted Hide Post
Perhaps Darin's field should be MTH_YR/A4MY=EDIT(MTH_YR_FIELD,'$$$$99') | MTH_NUM;
For sorting purposes


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Actually, to complete the thought, it would have to be converted from an alpha to a smart date ( format MY or YM - wouldn't matter which). As soon as it's a smart date, it will sort in the correct order. As long as it's in alpha format it will have sorting problems. Especially since you're only using a two-digit year. Year 2000 (00) would sort BEFORE year 1999 (99).


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
  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] Sorting of Month-YY

Copyright © 1996-2020 Information Builders