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

Function module to convert YYYYMMDD format to MMDDYYYY format

Former Member
0 Likes
1,843

Is there any function module to convert the YYYYMMDD date format to MMDDYYYY format?

Awaiting for ur reply...

Is there any function module to convert the YYYYMMDD date format to MMDDYYYY format?

Awaiting for ur reply...

8 REPLIES 8
Read only

satykumar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,204

Hi,

Check this FM DATE_STRING_CONVERT

Regards,

Satyendra

Read only

former_member404244
Active Contributor
0 Likes
1,204

Hi,

check the functionmodules

CONVERT_DATE_TO_EXTERNAL.

CONVERT_DATE_TO_INTERNAL.

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,204

Hi,

Use HRGPBS_HESA_DATE_FORMAT

Regards

Read only

Former Member
0 Likes
1,204

Hi Abirami,

<b>Function Modules related to Date and Time Calculations</b>

CALCULATE_DATE : Calculates the future date based on the input .

DATE_TO_DAY : Returns the Day for the entered date.

DATE_COMPUTE_DAY : Returns weekday for a date

DATE_GET_WEEK : Returns week for a date

DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified

MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.

END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.

HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.

FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.

MONTH_NAMES_GET : Get the names of the month

WEEK_GET_FIRST_DAY : Get the first day of the week

HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format

SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours

L_MC_TIME_DIFFERENCE : Find the time difference between two date/time

HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months

LAST_DAY_OF_MONTHS : Returns the last day of the month

<b>Reward pts for usefull answer :)</b>

Regards

Sathish

Read only

Former Member
0 Likes
1,204

Hi,

There is not any specific function module available to convert from YYYYMMDD TO MMDDYYYY.

Two ways to change the date format.

1) You can create your own function module.

2) convert into specified format.

data : dd(2) type c,

mm(2) type c,

yy(4) type c.

dd = sy-datum+6(2).

mm = sy-datum+4(2).

yy = sy-datum(4).

then concatenate in one variable say dat.

concatenate mm dd yy into dat.

Might your problem get resolved.

Rewards point if answer your query.

Regards,

Kinjal

Read only

Former Member
0 Likes
1,204

simple use:

WRITE date to ext_date MMDDYYYY.

date is in YYYYMMDD for mat type d

and ext_date(8) type c

Reward if useful

Regards

Prax

Read only

Former Member
0 Likes
1,204

Hi Abirami,

The function module to convert the date format from YYYYMMDD to MMDDYYYY is :

<b>CONVERT_DATE_TO_INTERNAL</b>

This Function Module will convert date as the internal format.

Regards,

Thasneem

Read only

Former Member
0 Likes
1,204

data: l_date(10) type c.

write: sy-datum to date.

write : date.

Simple I guess