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     Y2K PROBLEM IN DATETRAN

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Y2K PROBLEM IN DATETRAN
 Login/Join
 
Gold member
posted
Hi All,
I have a written function which converts the date into various formats based on the input parameter.

DEFINE FUNCTION DATEFMT(INDATE/MDYY, FMT/I1)
DATEFMT/A20 = IF FMT EQ 1 THEN DATETRAN(INDATE, '(MDYY)', '(/)', 'EN', 15, 'A15')
ELSE IF FMT EQ 2 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(/)', 'EN', 15, 'A15')
ELSE IF FMT EQ 3 THEN DATETRAN(INDATE, '(MDYY)', '(-)', 'EN', 15, 'A15')
ELSE IF FMT EQ 4 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(-)', 'EN', 15, 'A15')
ELSE IF FMT EQ 5 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(TRD)', 'EN', 20, 'A20')
ELSE IF FMT EQ 6 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(Btr)', 'EN', 20, 'A20')
ELSE IF FMT EQ 7 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(.)', 'EN', 15, 'A15')
ELSE IF FMT EQ 8 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'DMYY'), '(DMYY)', '(-dm)', 'EN', 15, 'A15')
ELSE IF FMT EQ 9 THEN DATETRAN(DATECVT(INDATE, 'MDYY', 'YYMD'), '(YYMD)', '(-)', 'EN', 20, 'A20');
END

And am using this function in the proc as follows.

TABLE FILE CAR
PRINT
COMPUTE DUMMY/MDYY = 08152000; AS 'ORIGINAL,DATE,(MM/DD/YYYY)'
COMPUTE DUMMY2/A20=DATEFMT(DUMMY, 2); AS ',,(DD/MM/YYYY)'
COMPUTE DUMMY3/A20=DATEFMT(DUMMY, 3); AS ',,(MM-DD-YYYY)'
COMPUTE DUMMY4/A20=DATEFMT(DUMMY, 4); AS ',,(DD-MM-YYYY)'
COMPUTE DUMMY5/A20=DATEFMT(DUMMY, 5); AS ',,(DD-MONTH-YYYY)'
COMPUTE DUMMY6/A20=DATEFMT(DUMMY, 6); AS ',,(DD Month YYYY)'
COMPUTE DUMMY7/A20=DATEFMT(DUMMY, 7); AS ',,(DD.MM.YYYY)'
COMPUTE DUMMY8/A20=DATEFMT(DUMMY, 8); AS ',,(dD-mM-YYYY)'
COMPUTE DUMMY9/A20=DATEFMT(DUMMY, 9); AS ',,(YYYY-MM-DD)'
BY CAR NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT, SIZE=6,$
TYPE=REPORT, COLUMN = 'C1', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C2', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C3', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C4', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C5', SQUEEZE=0.8,$
TYPE=REPORT, COLUMN = 'C6', SQUEEZE=0.8,$
TYPE=REPORT, COLUMN = 'C7', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C8', SQUEEZE=0.7,$
TYPE=REPORT, COLUMN = 'C9', SQUEEZE=0.7,$
ENDSTYLE
END

Problem is Year part is not properly displayed. it is displayed as -00ø0.
If the year is other than 2000 it displays the result without any problem.

Can anyone confirm whether I am doing wrong or it is a known problem.

Thanks all in advance.


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
 
Posts: 71 | Registered: November 20, 2003Report This Post
Virtuoso
posted Hide Post
It appears that DATETRAN is the problem, if you define the dates separately DATECVT works, but DATETRAN does not. I would report it to Information Builders. Personally don't use the functions much at all.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
I have also run into this problem (quite a while ago)- and it is only for the year 2000. 2001 and further looks correct. check out this additional post:

DATETRAN returns odd characters for year 2000

This message has been edited. Last edited by: Darin Lee,


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
Gold member
posted Hide Post
Thanks Leah, Darin,
I will open up a case and post the updates as soon as I get the updates from tech support.


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
 
Posts: 71 | Registered: November 20, 2003Report This Post
Expert
posted Hide Post
Hi all,

FYI, this is a known problem and already submitted to programming to fix it.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Expert
posted Hide Post
My pointless two cents: here we are in 2007 and we're still having Year 2000 issues?!


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Y2K PROBLEM IN DATETRAN

Copyright © 1996-2020 Information Builders