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 conversion

Former Member
0 Likes
646

Hi all,

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

eg : convert date from DDMMYYYY to YYYYWWD.

Thanking You,

Kasinath Babu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
598

Please don't post duplicate posts for the same issue.

Did you see the blog I have referred to?

Regards,

Ravi

NOte - Please close this post and continue with the other one.

5 REPLIES 5
Read only

Former Member
0 Likes
599

Please don't post duplicate posts for the same issue.

Did you see the blog I have referred to?

Regards,

Ravi

NOte - Please close this post and continue with the other one.

Read only

Former Member
0 Likes
598

Hi

This question has already been answered in your other thread . Please close this question and the other one also.

Read only

Former Member
0 Likes
598

YOu can just use the write statement:

write sy-datum to lv_datum edit mask 'YYYYMMDD'.

reGARDS,

rAVI

Read only

Former Member
0 Likes
598

Hi all,

I want the conversion from the format ( date month year ) to (year week day of week ) i.e. YYYY WW D

Read only

Former Member
0 Likes
598

HI,

Date = YYYYMMDD

Concatenate date4(2) ‘ /’ date6(2) ‘/’ date(4) into Date2.

or

data : l_date(10) type c .

concatenate sy-datum6(2) '/' sy-datum4(2) '/' sy-datum(4) into l_date.

write : l_date.

or

data :l_date(10) type c

CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'

EXPORTING

DATE_INTERNAL = SY-DATUM

IMPORTING

DATE_EXTERNAL = l_date.

or

PARAMETERS: P_DATE LIKE SY-DATUM.

DATA: T_MONTHS LIKE STANDARD TABLE OF T247 WITH HEADER LINE.

DATA: DATE LIKE AUSP-ATWRT.

CALL FUNCTION 'MONTH_NAMES_GET'

TABLES

MONTH_NAMES = T_MONTHS.

READ TABLE T_MONTHS WITH KEY MNR = P_DATE+4(2).

DATE(2) = P_DATE+6(2).

DATE+2(3) = T_MONTHS-KTX.

DATE5(2) = P_DATE2(2).

WRITE DATE.

Regards,

Laxmi.