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] Format Date as MD (9/12 for Today)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Format Date as MD (9/12 for Today)
 Login/Join
 
Master
posted
I'd like to format a date field to show 9/12, no year, but all the options in report painter include a year. I tried
START_DATE/MD AS 'Start,Date' and gives an error, but
START_DATE/YMD AS 'Start,Date' works just fine, I just don't want the year to show.

Any ideas?

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


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
If you don't mind an alpha output format, function DATETRAN may do the trick:

MONTH_DAY/A5 = DATETRAN(START_DATE,'(MD)','(m/)','ENG',5,'A5');  


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
I believe that date support must have the year.

I think Dans suggestion is the only way, convert to alpha.


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
Expert
posted Hide Post
Date support doesn't require the year:

TABLE FILE CAR
SUM
SALES
COMPUTE DT1/YYMD= &YYMD;
DT1/M
DT1/D
-*DT1/DM
END


I'd say that DM or MD was overlooked. New Feature Request?


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
Expert
posted Hide Post
Using the day, month or year just extracts the number.

To have day and month you must have a year to put the date in context, so you know what the day of week is.


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
Almost.
Casting (reformatting at report time) a /yymd date as...
... /m takes the integer offset (in months) from january, in isolation from the original full date, and formats that for output.

... /d takes the integer offset (in days) from the first of the month

... /md would have to take the integer offset (in days) from Jan 1 -- and how to format that would be dependent on the year (i.e., on whether the year is or is not a Leap Year).


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
I think this is a bug/oversight.

If the date is a smart date, the year is there and the format is irrelevant and one should be able to print the date using any combination of valid components. I would consider MD or DM to be valid combinations.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Master
posted Hide Post
we'll just have to convert to alpha for this report. If it were an OLAP report, and sortable on this date field it would be more of a problem.

Agreed, is a bug from my perspective. Thanks everyone for your help!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
Another option is to convert the date to a date-time field. Date-time fields have a few more formatting options available than SmartDates. The lower case "d" in the output format specification drops leading zeroes in the day component of the output, but I can't find a corresponding format option for the month component (another oversight?).

TABLE FILE CAR
 PRINT
  COUNTRY
  COMPUTE START_DATE/HYYMD = DT(&YYMD); NOPRINT
  START_DATE/HMd
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 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     [SOLVED] Format Date as MD (9/12 for Today)

Copyright © 1996-2020 Information Builders