IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Date Display
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
kj
Gold member
Posted
Any one know how to display date in three letter month and two digit year format.
I have date like 12/01/2004 I need to display it as Dec 04 (No comma only a space between month and year).
I would appreciate if any one can help me in getting this done.
Thanks,
kj
 
Posts: 83 | Registered: August 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
kj
Gold member
Posted Hide Post
for got to mention that I need to display it in graphs. I know how to do this in Tabular reports. I tried the same approach in graphs but loosing the order.

Thanks in advance.
kj
 
Posts: 83 | Registered: August 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
<Pietro De Santis>
Posted
Believe it or not, I don't think there'a a better way than this:

TABLE FILE CAR
PRINT
COUNTRY
COMPUTE DT1/A10='12/01/2004'; NOPRINT
COMPUTE DT2/A2=EDIT(DT1,'99'); NOPRINT
COMPUTE DT4/A03 = DECODE DT2('01' 'JAN', '02' 'FEB', '11' 'NOV', '12' 'DEC' ELSE 'XXX'); NOPRINT
COMPUTE DT5/A6 = DT4 | ' ' | EDIT(DT1,'$$$$$$$$99');
END

Of course, you have to code the rest of the months in the DECODE.
 
Reply With QuoteEdit or Delete MessageReport This Post
kj
Gold member
Posted Hide Post
Pietro,
Thanks for your response. But when you sort it based on DT5 in graph, it will do alpha sort not a date sort. In tabular reports we can do with date sort NOPRIT option. I am not sure if NOPRINT will work in graphs. I have to try this option.

Thanks,
kj
 
Posts: 83 | Registered: August 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
<Pietro De Santis>
Posted
Then tell your users they will have to live with a comma in the date.

DEFINE FILE CAR
DT1/A10='12/01/2004';
DT2/A8MDYY=EDIT(DT1,'99$99$9999');
DT3/MTY = DT2;
END
GRAPH FILE CAR
SUM
SALES
BY DT3
END
 
Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Well I know this was an old post, but I found this on the Knowledge Base that seems to solve this problem.

http://techsupport.informationbuilders.com/ibase/master...afldfrm5.htm#1026417
 
Posts: 1188 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
take your date and make it i8yymd , from which you can make it a date-time format, then you can format it very nicely, no comma.
DEFINE FILE whatever
NEWTIME/HYYMDIA=DT(&YYMD 12:00AM);
NICEDAY/HMtD = NEWTIME;

will give you Aug 24 for NICEDAY ...
well, if it IS Aug 24
see this post

This message has been edited. Last edited by: kerry,
 
Posts: 2631 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteEdit or Delete MessageReport This Post
<Pietro De Santis>
Posted
Susannah, great suggestion - I didn't think of that.

Pietro.
 
Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Date Display

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.