Focal Point
[SOLVED] Maintain display month name on form

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

December 11, 2010, 12:30 PM
brad-s
[SOLVED] Maintain display month name on form
How do I display the month name and day on form form in an edit variable?
DAT1/YYMD e.g. shows as 2010/12/25
I want to display 2010 Dec 25.

Is there a format
or just break apart original date variable and manually build the month name and day components

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


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
December 11, 2010, 01:08 PM
Dan Satchell
SmartDate format 'YYMtD' will translate the month to a 3-character name, but it also inserts a comma delimiter after the year. Format option 'B' uses blanks as delimiters, but month translation and 'B' do not work together for some reason that escapes my sense of rational (i.e., 'YYBMtBD'). If you don't want the comma delimiter, then you can use function DATETRAN to produce the desired output. The 't' format option translates the month and the 'd' option removes leading zeroes from the day numbers (e.g., 2010 Dec 01 -> 2010 Dec 1).

DEFINE FILE CAR
 DATE1/YYMD WITH COUNTRY = '&YYMD';
 DATE2/YYMtD = DATE1 ;
 DATE3/A12 = DATETRAN(DATE1,'(YYMD)','(td)','EN',12,'A12');
END
-*
TABLE FILE CAR
 PRINT DATE1 DATE2 DATE3
 WHERE RECORDLIMIT EQ 1
END



WebFOCUS 7.7.05
December 11, 2010, 01:48 PM
GamP
Don't know if this is also the case for the release you're working wth, but in my 7.7.01 maintain I can just use the yybmbd format. It displays as '2010 Nov 12' and I can change the dates and it returns the correct values.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
December 13, 2010, 08:24 AM
brad-s
That format worked!
Thanks for help.


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve