07-15-2007 2:34 PM
what is the process to change the date format,usually the date will be in which format by default
07-15-2007 2:59 PM
hi,
by default the date format is...
😧 Date format----
> YYYYMMDD.
the date format is different from country to country.........., the necessity to change the date format based on requirement...
<b>WRITE .... <f> <option>.</b>
WRITE DATE <option>.
Option Function
DD/MM/YY Separators as defined in users master record.
MM/DD/YY Separators as defined in users master record.
DD/MM/YYYY Separators as defined in users master record.
MM/DD/YYYY Separators as defined in users master record.
DDMMYY No separators.
MMDDYY No separators.
YYMMDD No separators.
<b>example:</b>
WRITE: sy-datum,
/ sy-datum yymmdd.
output:
27.06.1995
950627
you can also use these function modules to convert date..
CONVERT_DATE_TO_INTERNAL.
CONVERT_DATE_TO_EXTERNAL.
regards,
Ashok Reddy
07-15-2007 2:59 PM
hi,
by default the date format is...
😧 Date format----
> YYYYMMDD.
the date format is different from country to country.........., the necessity to change the date format based on requirement...
<b>WRITE .... <f> <option>.</b>
WRITE DATE <option>.
Option Function
DD/MM/YY Separators as defined in users master record.
MM/DD/YY Separators as defined in users master record.
DD/MM/YYYY Separators as defined in users master record.
MM/DD/YYYY Separators as defined in users master record.
DDMMYY No separators.
MMDDYY No separators.
YYMMDD No separators.
<b>example:</b>
WRITE: sy-datum,
/ sy-datum yymmdd.
output:
27.06.1995
950627
you can also use these function modules to convert date..
CONVERT_DATE_TO_INTERNAL.
CONVERT_DATE_TO_EXTERNAL.
regards,
Ashok Reddy
07-16-2007 8:27 AM
please refer to this sample code:
data : date type date.
data : date1 type d.
data: date2 type dats.
date = sy-datum.
date1 = sy-datum.
date2 = sy-datum.
write : date , date1, date2.
output: 20070619 19062007 19.06.2007