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 format

naveen_inuganti2
Active Contributor
0 Likes
647

Hi all...

Iam having one date field it contains different dates.....

but while dispalying that field i have to to display first date of that month...

like...

if 07/24/2008 ---> 07/01/2008

05/15/2008 ---> 05/01/2008

how can i do this?

Thank you,

naveen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
626

Hi,

USe This;

DATA: wa_date LIKE sy-datum.

DATA: wa_date1 LIKE sy-datum,

wa_date2 LIKE sy-datum.

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'

EXPORTING

iv_date = i_date

IMPORTING

ev_month_begin_date = wa_date1

ev_month_end_date = wa_date2.

Regards,

Shiva

4 REPLIES 4
Read only

peter_ruiz2
Active Contributor
0 Likes
626

hi naveen,

data: v_date type char10.

v_date = 07/24/2008.

concatenate v_date(2) '01' v_date+6(4) into v_date separated by '/'.

write v_date.

regards,

Peter

Read only

Former Member
0 Likes
626

data : dat type sy-datum.

dat = '20080424'.

write: dat MM/DD/YYYY.

Read only

Former Member
0 Likes
627

Hi,

USe This;

DATA: wa_date LIKE sy-datum.

DATA: wa_date1 LIKE sy-datum,

wa_date2 LIKE sy-datum.

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'

EXPORTING

iv_date = i_date

IMPORTING

ev_month_begin_date = wa_date1

ev_month_end_date = wa_date2.

Regards,

Shiva

Read only

Former Member
0 Likes
626

data:w_day type d.

w_day = sy-datum.

w_day+6(2) = '01'.

write w_day.

Try like this.

Regards,

Jagadeesh.