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     More fun with dates [Solved]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
More fun with dates [Solved]
 Login/Join
 
Platinum Member
posted
Using this code:
CUTOFF_DATE_PLUS_1/MtrDYY = CUT_OFF_DT + 1 ;

I get September 1, 2010, which is correct.

But how can I convert this to alpha so I can use this date in an alphanumeric concatenation??

This message has been edited. Last edited by: Ted Michalski,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Virtuoso
posted Hide Post
There is a great book available for only 25 U$
It gives you almost 1001 tips and trics on dates and conversions




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Aren't date formats alpha by their nature?


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Master
posted Hide Post
no, but many dbms' display them as text which may lead you to believe they are. The same as Integers look like text, but you can't add 2 text columns (even if there is numeric data contained).

-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Expert
posted Hide Post
Ted,

You can't use a report formatting date to do what you want. This will work:
  
APP PREPENDPATH IBISAMP
-RUN
DEFINE FILE CAR
  XDATE/YYMD = '&DATEYYMD';
  CUTOFF_DATE_PLUS_1/YYMD = XDATE + 1 ; 
END
TABLE FILE CAR
SUM
  CUTOFF_DATE_PLUS_1
WHERE RECORDLIMIT EQ 1;
 BY COUNTRY NOPRINT
  ON TABLE SAVE
END
-RUN
-READ SAVE, &CUTOFF
-TYPE &CUTOFF

-SET &ENGL_DT   = LCWORD(17,CHGDAT('YYMD', 'MDYYX', &CUTOFF.EVAL, 'A17'), 'A17');
-SET &ENGL_MO   = GETTOK('&ENGL_DT.EVAL', 17, 1, ' ', 17, 'A17');
-SET &ENGL_DA   = GETTOK('&ENGL_DT.EVAL', 17, 2, ' ', 17, 'A17');
-SET &ENGL_YR   = GETTOK('&ENGL_DT.EVAL', 17, 3, ' ', 17, 'A17');
-SET &ENGL_DATE = &ENG_MO || (' ' | &ENG_DA) || ',' || (' ' | &ENG_YR);
-TYPE &ENGL_DATE

Now, you can use &ENGL_DATE ...

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Thanks for everyone's input.

Ted, suggestion from our expert: Please refer to the DATETRAN function which has been available since 7.6.1. The basic overview is:

DATETRAN(indate, '(intype)', '(formatopts)', 'lang', outlen, outfield)
Formats dates in International formats

DATETRAN(DATEFIELD, '(MDYY)', '(wrctrdo)', 'EN', 150, FMTDATE) will print: Tuesday, March 17th 2009


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report 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     More fun with dates [Solved]

Copyright © 1996-2020 Information Builders