Focal Point
Date Display

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5971018331

December 07, 2004, 10:48 PM
<kj>
Date Display
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
December 07, 2004, 10:49 PM
<kj>
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
December 08, 2004, 01:28 PM
<Pietro De Santis>
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.
December 08, 2004, 01:36 PM
<kj>
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
December 08, 2004, 01:53 PM
<Pietro De Santis>
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
March 03, 2005, 01:52 PM
Prarie
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
March 04, 2005, 06:12 PM
susannah
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,
March 07, 2005, 04:45 PM
<Pietro De Santis>
Susannah, great suggestion - I didn't think of that.

Pietro.