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 componentsThis 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.