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     Convert YYMtD to YY-Mt-D

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Convert YYMtD to YY-Mt-D
 Login/Join
 
Guru
posted
I've searched high and low in Focal Point and have come up empty so I will cast my line here:

We have a report that requires dates in the YY-Mt-D format. The user is not satisfied with any variation readily available with Smart Dates, e.g. YYMtD.

Thanks in advance to the Focus Nation.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 238 | Location: Atlanta, GA/Rehovot, Israel | Registered: May 06, 2003Report This Post
Platinum Member
posted Hide Post
I created a lookup file that has the dates in our native system format with a key that is a smart date. Whenever I need to change anything about a date, I join my native date to the native format in the lookup table and use the key column for manipulation.

Ex:
Our native format is CYYMMDD(1100203 = Feb 3, 2010)

Lookup table:
   Key             Native Col
      2010-02-01         1100201
      2010-02-02         1100202
      2010-02-03         1100203

This message has been edited. Last edited by: T.Peters,


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
Try using DATETRAN
NC_DATE/A40 = DATETRAN (DL_DATE, '(YYMD)', '(-t)', 'EN', 40, 'A40');


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
Alan - please help me out here because I'm getting a (FOC error (that is a description, not an adjective. Big Grin)

I already have a date in the YYMtD format,so would the
correct DEFINE be:

NC_DATE/A40 = DATETRAN(DL_DATE, '(YYMtD)', '(-t)', 'EN', 40, 'A40); ?

Here the DL_DATE is already in YYMtD format.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 238 | Location: Atlanta, GA/Rehovot, Israel | Registered: May 06, 2003Report This Post
Expert
posted Hide Post
The "t" in your already formatted date is just for display purposes, I think you should still use YYMD within the function. If that doesn't work, then supply a YYMD date field to the function and not the YYMtD date field.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Francis - thanks as usual. I will test and share results.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 238 | Location: Atlanta, GA/Rehovot, Israel | Registered: May 06, 2003Report This Post
Virtuoso
posted Hide Post
The input format, the second parameter, describes the date components AND the display order. It does not contains any formatting options as Francis said.

Full details are here


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 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     Convert YYMtD to YY-Mt-D

Copyright © 1996-2020 Information Builders