10-09-2007 4:57 AM
hi experts
i have a variable in which i have stores a date
from that date i want to store only the month value in a seperate variable .
plz give me the code for this
thanks in advance .
10-09-2007 5:00 AM
Here is the code:
data: l_datum like sy-datum.
data: l_month(2) type c.
Assign value to L_DATUM
l_month = l_datum+4(2).
Hope this helps.
ashish
10-09-2007 4:59 AM
The example below gives you the month of the current date. You can use with any date variable to get the month.
DATA lc_month(2) TYPE c.
lc_month = sy-datum+4(2).
10-09-2007 4:59 AM
Hi Anit,
l_date = '2006.05.24'. "YYYY.MM.DD
l_month = l_date+5(2).
Best regards,
Prashant
10-09-2007 5:00 AM
Here is the code:
data: l_datum like sy-datum.
data: l_month(2) type c.
Assign value to L_DATUM
l_month = l_datum+4(2).
Hope this helps.
ashish
10-09-2007 5:05 AM
DATA : date TYPE sy-datum VALUE '20071201'.
Format 'YYYYMMDD'
DATA: month TYPE char2.
month = date+4(2).
WRITE: month.
Rewards if useful.....................
Minal