Application Development and Automation 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: 
Read only

date problem

Former Member
0 Likes
1,206

pa0028-exdat = '20080401'.

Wish to get month.

month = ' 04'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,182

Hi,

Use the following code.

pa0028-exdat = '20080401'.

month = pa0028-exdat+4(2).

REWARD IF USEFUL

8 REPLIES 8
Read only

Former Member
0 Likes
1,182

Hi,

will u be a little bit clear abt ur doubt?

Read only

Former Member
0 Likes
1,182

Hi,

Try this FM.

HR_IN_GET_DATE_COMPONENTS

Regards,

Ramya

Read only

Former Member
0 Likes
1,183

Hi,

Use the following code.

pa0028-exdat = '20080401'.

month = pa0028-exdat+4(2).

REWARD IF USEFUL

Read only

Former Member
0 Likes
1,182

Hi abhut,


write pa0028-exdat+4(2).

The above means

LEAVE 4 characters &

TAKE 2 characters

regards,

amit m.

Read only

Former Member
0 Likes
1,182

write:/ pa0028-exdat+4(2)

Read only

prasanth_kasturi
Active Contributor
0 Likes
1,182

hi,

month = pa0028-exdat+4(2).

regards

prasanth

Read only

Former Member
0 Likes
1,182

data: v_date type d ,

mon(2) type c .

pa0028-exdat = '20080401'.

v_date = pa0028-exdat .

mon = v_date+4(2) .

write:/ mon .

regards,

venkat.

Read only

Former Member
0 Likes
1,182

Hi ABHUT,

Use string manupulation for retrieving the month by parsing the date string

Example :

Data : l_date type D,

l_month(02).

l_date = '20080401' .

l_month = l_date+4(2).

Hope this helps.

Thanks,

Greetson

Edited by: Greetson Shunmugasundaram on Apr 23, 2008 2:28 PM