10-08-2007 2:09 PM
Hi,
There is a SAPScript Form. which is used to print a Certificate of Analysis for an inspection lot.
The 'Manufacturing Date' and the 'Expiry Date' are currently in the European format (YYYY-MM-DD). It needs to be changed to the American format (MM/DD/YYYY).
I found those two dates in TWO windows( INFo2 and PAGE ).
Thanks in advance!!!!!!!!!
Regards,
Kumar.
10-08-2007 2:14 PM
hi Kishore,
data: date(8) value '20071008',
date2(8).
write date4(4) to date20.
write date0(4) to date24.
write: date, / date2.
Regards
Allan Cristian
10-08-2007 2:15 PM
Hi,
To format date fields, use the SAPscript SET DATE MASK command. Executing this command causes all subsequent date fields to be printed with the specified formatting.
Syntax
/: SET DATE MASK = 'date_mask'
The following templates may be used in the date mask:
DD day (two digits)
DDD name of day (abbreviated)
DDDD name of day (written out in full)
MM month (two digits)
MMM name of month (abbreviated)
MMMM name of month (written out in full)
YY year (two digits)
YYYY year (four digits)
LD day (formatted as for the L option)
LM month (formatted as for the L option)
LY year (formatted as for the L option)
Any other characters occurring in the mask are interpreted as simple text and are copied directly to the output.
Assuming a current system date of March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM.DD.YY'
&DATE& -> Foster City, 03.01.97
&DATE(Z)& -> Foster City, 3.1.97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
You can revert to the standard setting by using the SET DATE MASK command again with an empty string in place of the date mask:
/: SET DATE MASK = ' '
Regards
Sudheer
10-08-2007 2:17 PM
10-08-2007 2:44 PM
Hi,
Try using FM CONVERT_DATE_FORMAT.
If input the date in yyyymmdd, the output will be always mm.dd.yyyy.
Thanks,
Sriram Ponna.