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

Conversion of date

Former Member
0 Likes
981

Hi all,

Is there any Function module to convert date from one format to other?

eg : convert date from DDMMYYYY to YYYYMMDD.

Thanking You,

Kasinath Babu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
944

use FM <b>CONVERSION_EXIT_PDATE_INPUT </b>

Regards,

Santosh

7 REPLIES 7
Read only

Former Member
0 Likes
944

CONVERSION_EXIT_PDATE_INPUT

Read only

Former Member
0 Likes
944

See this blog

/people/himanshu.gupta/blog/2006/11/24/fms-to-convert-date-from-user-format-into-sap-standard

Regards,

Ravi

Note - Please mark all the helpful answers and close the thread if the issue is resolved.

Read only

Former Member
0 Likes
944

hi

if you have DDMMYYYY in a field, say, lv_date, then use the following statement; no function module required for this purpose...

<b>concatenate lv_date4(4) lv_date2(2) lv_date+0(2) into lv_date</b>.

Hope this helps.

Sajan.

Read only

Former Member
0 Likes
944

HI,

Use <b>''Convert_date_to_internal'</b> function module

Read only

Former Member
0 Likes
945

use FM <b>CONVERSION_EXIT_PDATE_INPUT </b>

Regards,

Santosh

Read only

Former Member
0 Likes
944

Use CONVERSION_EXIT_PDATE_INPUT

or else declare variables V1 V2 V3

V1 = date+0(2).

V2 = date+3(2).

V3 = date+5(4).

concatenate v3 v2 v1 into date.

Read only

Former Member
0 Likes
944

Hi kasinath,

there are so many function modules below are some of them

DATE_TO_DAY --> input is date and output is which day that date belongs to.

DATE_GET_MONTH_LASTDAY --> if u give some date as input the output will be the last day of the particular month.