Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

date conversion

Former Member
0 Kudos
78

Hi All,

Is there any function module which can convert '02' to february

'03' to march....

from sy-datum i want to pick month and year eg: 20070522

i want it as 'may 2007'...

Regards,

Radhika.

5 REPLIES 5

Former Member
0 Kudos
57

Hi

use the fun module

IDWT_READ_MONTH_TEXT to get month texts

and concatenate with Date and year and use

Reward points if useful

Regards

Anji

Former Member
0 Kudos
57
try this..

data : v_ltx like t247-ltx, 
         v_date(25).

select single ltx from t247 into v_ltx where mnr eq sy-datum+4(2) and spras eq sy-langu.

concatenate v_ltx sy-datum+0(4) into v_date.

write : v_date.

Former Member
0 Kudos
57

hi,

DATA: DATE_CHAR(20).
DATA: DATE TYPE SY-DATUM.
DATA: MONTH_NAME LIKE T247-LTX.
DATE = SY-DATUM.

SELECT SINGLE LTX FROM T247
INTO MONTH_NAME
WHERE SPRAS = SY-LANGU
AND MNR = SY-DATUM+4(2).

CONCATENATE SY-DATUM+6(2) MONTH_NAME SY-DATUM(4)
INTO DATE_CHAR SEPARATED BY SPACE.

WRITE: / DATE_CHAR.

or use this FM

CACS_DATE_GET_YEAR_MONTH : *To get the number of the month
MONTH_NAMES_GET:

*To get month description

Regards

Reshma

Former Member
0 Kudos
57

Hi Premraj,

Use function module <b>MONTH_NAMES_GET</b>. Give your month value to the MONTH_NAMES table to get the month text.

Thanks,

Vinay

Former Member
0 Kudos
57

hi,

u can use this function module....

DATA : L_DATE(20) TYPE C.

WF_DATE TYPE PA0001-BEGDA,

CALL FUNCTION 'ZHRG_GET_LETTER_DATE'

EXPORTING

DATE = WF_DATE " any date

IMPORTING

DATE_CHAR = L_DATE.

L_DATE = L_DATE+3(16). " it hav the full alpha of date from that u can extract..

with regards,

S.Barani