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]A9V format (Jul, 2012, Aug, 2012, Sep, 2012) to DATE formats

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]A9V format (Jul, 2012, Aug, 2012, Sep, 2012) to DATE formats
 Login/Join
 
Guru
posted
Hi All,

I have a Date values in A9V format in Oracle DB. Eg, Jul, 2012, Aug, 2012, Sep, 2012, Oct, 2012.
I'd like to convert to DATE formats(YYM or MYY), Is there any easy way or function available for this?

I guess, we can achieve this by using

SUBSTR function for extracting the strings(Jul,Aug, etc) and YEAR(2012,2013 etc), followed by IF.. THEN..ELSE and concatenating two fields, assigned to desire DATE format.

Something like below,
 
 -* Note, it doesn't have whole code
-*EFFECTIVE_DATE  = Jul, 2012, Aug, 2012, Sep, 2012, Oct, 2012 etc
DEFINE FILE TEST
DALPHAFMT/A10 = EFFECTIVE_DATE;
STR1/A3 = SUBSTR(10, DALPHAFMT, 1, 3, 3, STR1);
STR2/A5 = SUBSTR(10, DALPHAFMT, 5, 9, 5, STR2);
STR3/A10 = STR1 | STR2;
STR4/A4 = IF STR1 EQ 'Jan' THEN '01' ELSE IF STR1 EQ 'Feb' THEN '02' ELSE IF STR1 EQ 'Mar' THEN '03' ELSE IF STR1 EQ 'Apr' THEN '04' ELSE IF STR1 EQ 'May' THEN '05' ELSE IF STR1 EQ 'Jun' THEN '06' ELSE IF STR1 EQ 'Jul' THEN '07' ELSE IF STR1 EQ 'Aug' THEN '08' ELSE IF STR1 EQ 'Sep' THEN '09' ELSE IF STR1 EQ 'Oct' THEN '10' ELSE IF STR1 EQ 'Nov' THEN '11' ELSE '12';
END

TABLE FILE TEST
PRINT 
EFFECTIVE_DATE
STR1
STR2
STR3
STR4
END


But, seems its not efficient to my knowledge.

Please, help me on this.

Thanks,
Rifaz

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


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Repeating this again:

In any data source excluding .foc or .xfoc, the ability to convert alpha strings to dates directly within the MFD exists by using DATEPATTERN.
. . . .USAGE=YYM,ACTUAL=A9V,DATEPATTERN='[Mon], [YYYY]',$
Really saves a lot of work!


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Yes, you had posted this before, and its a great one, I'm bookmarking this page.

The benefits of a search....


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
Guru
posted Hide Post
Thanks Alan,

Believe it or not Wink, I also got the same idea, when I searched in the Help Doc today .

Got some problem in my n/w connection, so couldn't replied to this post earlier.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report 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]A9V format (Jul, 2012, Aug, 2012, Sep, 2012) to DATE formats

Copyright © 1996-2020 Information Builders