2007 Oct 03 11:55 AM
Hi Experts ,
which FM can convert the date 12/12/2007 into 12-dec-07?
regs
Murthy
2007 Oct 03 12:03 PM
Hi Narayana,
Convert the date into INternal format by using Exit_internal
Use this Fm
CONVERSION_EXIT_SDATE_OUTPUT
and pass the below values
Import parameters Value
INPUT 20070704
Export parameters Value
OUTPUT 04.JUL.2007
(or)
EPORT ychatest.
DATA: int_datum LIKE sy-datum VALUE '20070705',
ext_datum(11) TYPE c.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_datum
IMPORTING
output = ext_datum.
TRANSLATE ext_datum USING '.-'.
WRITE : ext_datum.
Reward if helpful.
Regards,
Harini.S
2007 Oct 03 11:58 AM
Hi,
Take the help from this code :
data : date(10),
text1(26),
num1(10),
test_day(15),
o_date(20),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = '12/12/2007'.
day = date+0(2).
month = date+3(2) + 1.
year = date+6(4).
concatenate year month day into idate.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
EXPORTING
idate = idate
IMPORTING
DAY = oday
MONTH = omonth
YEAR = oyear
LTEXT = ltext.
concatenate oday ltext oyear into o_date separated by SPACE.
write : O_date.
Regards,
Sandeep Kaushik
2007 Oct 03 12:01 PM
hi
u can use edit mask in write statement, by using
write:/ var using '==IDATE' OR 'SDATE'
SURE U LL GET
2007 Oct 03 12:03 PM
Hi Narayana,
Convert the date into INternal format by using Exit_internal
Use this Fm
CONVERSION_EXIT_SDATE_OUTPUT
and pass the below values
Import parameters Value
INPUT 20070704
Export parameters Value
OUTPUT 04.JUL.2007
(or)
EPORT ychatest.
DATA: int_datum LIKE sy-datum VALUE '20070705',
ext_datum(11) TYPE c.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_datum
IMPORTING
output = ext_datum.
TRANSLATE ext_datum USING '.-'.
WRITE : ext_datum.
Reward if helpful.
Regards,
Harini.S
2007 Oct 03 12:04 PM
data : date like sy-datum.
data : odate(10) type c.
date = sy-datum. " in format YYYYMMDD
CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
input = date
IMPORTING
OUTPUT = odate .
write:/ odate. "in ur format '.
1.
In ur itab make a field for date as 10 characters and use this Fm to store the date .
2. Pass the date as the charcter field to the screen and now check .
Please give me reward points
Thanks
Murali Poli
2007 Oct 03 12:06 PM
HI,
You can directly use <b>SET DATE MASK DD MMM YYYY</b>
Regards
Sudheer