‎2008 Nov 26 11:42 AM
Hi Guru(s),
In check printing i am getting date like 26.11.2008
But required like 26th November 2008.
i am using Perform to send the date,
there is any FM is there to convert the format.
Thanks And Regards,
Mohammed.
‎2008 Nov 26 12:04 PM
Hi Abdul,
Use SET DATE MASK for this.
/: SET DATE MASK = 'date_mask'
In the date mask, you can use the following codes:
u2022 DD: day (two digits)
u2022 DDD: day name - abbreviated
u2022 DDDD: day name - written out in full
u2022 MM: month (two digits)
u2022 MMM: month name - abbreviated
u2022 MMMM: month name - written out in full
u2022 YY: year (two digits)
u2022 YYYY: year (four digits)
u2022 LD: day (formatted as for the L option)
u2022 LM: month (formatted as for the L option)
u2022 LY: year (formatted as for the L option)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
Assuming the current system date is March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
Hope this will help.
Regards,
Nitin.
‎2008 Nov 26 11:47 AM
Hi
Use any of Function Modules ..
CONVERT_DATE_TO_INTERNAL ..
CONVERT_DATE_TO_EXTERNAL..
regards
Nishit
‎2008 Nov 26 11:55 AM
You can as well use EDITMASK syntax I believe.
Regards,
Narendra.
‎2008 Nov 26 12:04 PM
Hi Abdul,
Use SET DATE MASK for this.
/: SET DATE MASK = 'date_mask'
In the date mask, you can use the following codes:
u2022 DD: day (two digits)
u2022 DDD: day name - abbreviated
u2022 DDDD: day name - written out in full
u2022 MM: month (two digits)
u2022 MMM: month name - abbreviated
u2022 MMMM: month name - written out in full
u2022 YY: year (two digits)
u2022 YYYY: year (four digits)
u2022 LD: day (formatted as for the L option)
u2022 LM: month (formatted as for the L option)
u2022 LY: year (formatted as for the L option)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
Assuming the current system date is March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
Hope this will help.
Regards,
Nitin.
‎2008 Nov 26 12:27 PM
‎2008 Nov 28 6:58 AM
Thnk..,
cannot we directly get the exactly 26th November 2008.
with out hard coding ..,
Regards,
Mohammed.
‎2008 Nov 28 2:38 PM
Hi there,
data : date(10),
text1(26),
num1(10),
test_day(15),
idate type sy-datum.
data : Day(2), month(2), Year(4).
data : ODay(2), Omonth(2), OYear(4).
data : Ltext Type T247-LTX.
date = sy-datum.
day = date+6(2).
month = date+4(2).
year = date+0(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.
‎2008 Nov 28 2:49 PM
Hello,
Try this FM: CONVERSION_EXIT_LDATE_OUTPUT and CONVERSION_EXIT_SDATE_OUTPUT.
Thanks,
Jayant