2008 Feb 08 12:05 PM
Hi,
My date format is 07.02.2008, but i want the date to be in 7 February 2008 format as per my requirement. Can any bosy suggest me some function module which converts the date into my desired format. Or is there any alternative solution for this.
Regards,
Venkat.
2008 Feb 08 12:13 PM
Hello,
Use the FM : CONVERSION_EXIT_LDATE_OUTPUT
Usage:
DATA ldate(20).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
OUTPUT = ldate.
Input : 20080208
output : 08.February2008
Cheers,
Remi
Plz Reward points, once you get the pbm solved!!
2008 Feb 08 12:08 PM
Hi,
Split your date to Day, Month and year and call the FM MONTH_NAMES_GET, then pass your month variable and get the text for the month. Then after concatenate your Day,month in text formate and year with space.
Rgds,
Bujji
2008 Feb 08 12:11 PM
hi,
CONVERSION_EXIT_LDATE_OUTPUT Converts date format
CONVERT_DATE_TO_EXTERNAL Formats date from internal to display format
CONVERT_DATE_TO_INTERNAL Formats date from display to internal format
DATE_CONV_EXT_TO_INT Conversion of dates to SAPs internal format
DATE_CONVERT_TO_FACTORYDATE Converts calendar date into factory day
DATE_CONVERT_TO_WORKINGDAY Converts a calendar date into working day
Hope this helps, Do reward.
2008 Feb 08 12:13 PM
Hi
there is a functional module conversionldate*
please check it and pass the value
i dont have to give proper one
Regards
Shiva
2008 Feb 08 12:13 PM
Hello,
Use the FM : CONVERSION_EXIT_LDATE_OUTPUT
Usage:
DATA ldate(20).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
OUTPUT = ldate.
Input : 20080208
output : 08.February2008
Cheers,
Remi
Plz Reward points, once you get the pbm solved!!
2008 Feb 08 12:16 PM
hi
try this
suppose your date is in variable v_date
v_day = v_date+0(2).
v_month = v_date+3(2).
v_year = v_date+7(4).
if v_month = '01'.
v_month = 'January'.
elseif v_month = '02'.
v_month = 'Feburary'.
elseif v_month = '03'.
v_month = 'March'.
elseif v_month = '04'.
v_month = 'April'.
elseif v_month = '05'.
v_month = 'May'.
elseif v_month = '06'.
v_month = 'June'.
elseif v_month = '07'.
v_month = 'July'.
elseif v_month = '08'.
v_month = 'August'.
elseif v_month = '09'.
v_month = 'September'.
elseif v_month = '10'.
v_month = 'October'.
elseif v_month = '11'.
v_month = 'November'.
elseif v_month = '01'.
v_month = 'January'.
elseif v_month = '12'.
v_month = 'December'.
endif.
concatenate v_day v_month v_year into v_date_final seperated by space.
regards
vijay
reward points if helpful
2008 Feb 08 12:18 PM
check this...may b usefull
data:longdate(50).
data:date(10) type c value '01.02.2008'
perform longdate using date+3(2) changing longdate.
concatenate date0(2) longdate date6(4) into longdate separated by space.
write longdate.
*******************************************
form longdate using P_mon changing p_lngdate.
data:wk_month(2).
write P_mon to wk_month using edit mask '==ALPHA'.
case wk_month.
when '1'.
p_lngdate = 'JANUARY'.
when '2'.
p_lngdate = 'FEBRUARY'.
--
--
--
--when '12'.
p_lngdate = 'DECEMBER'.
endcase.
endform.
2008 Feb 08 12:20 PM
ata:longdate(50).
data:date(10) type c value '01.02.2008'
perform longdate using date+2(2) changing longdate.
concatenate date0(2) longdate date5(4) into longdate separated by space.
write longdate.
*******************************************
form longdate using P_mon changing p_lngdate.
data:wk_month(2).
write P_mon to wk_month using edit mask '==ALPHA'.
case wk_month.
when '1'.
p_lngdate = 'JANUARY'.
when '2'.
p_lngdate = 'FEBRUARY'.
--
--
--
--when '12'.
p_lngdate = 'DECEMBER'.
endcase.
endform.
2008 Feb 08 12:21 PM
2008 Feb 08 12:39 PM
Hi write a custom FM for this
-
importing parameter =
IM_DATE TYPE DATUM
IM_LANGU TYPE LANGU
EXPORTING PARAMATER =
EX_MONTH TYPE FCLTX
code will be like this.
If no language input it will get data for Login Langulage
IF im_langu IS INITIAL.
Get Month Name
SELECT SINGLE ltx
FROM t247
INTO ex_month
WHERE spras EQ sy-langu
AND mnr EQ im_date+4(2).
IF sy-subrc NE 0.
RAISE month_names_not_found.
ENDIF.
ELSE.
Get Month Name
SELECT SINGLE ltx
FROM t247
INTO ex_month
WHERE spras EQ im_langu
AND mnr EQ im_date+4(2).
IF sy-subrc NE 0.
RAISE month_names_not_found.
ENDIF.
ENDIF.
-
HOPE DIS WIL HELP YOU ALOT.I TRIED MYESLF AND IT IS WORKING FINE.
REWARD IF FIND USEFUL
Cheers
Anup S.