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

Former Member
0 Likes
826

Hi all,

I want to convert date which is in the format MMDDYY to sy-datum format YYYYMMDD.how can i do this?

Thanks,

Rakesh.

6 REPLIES 6
Read only

RaymondGiuseppi
Active Contributor
0 Likes
774

Try function module /SAPDMC/LSM_DATE_CONVERT.

Regards

Read only

Former Member
0 Likes
774

Hi Rakesh.

Reply in your other thread.

Regards

Aneesh.

Read only

Former Member
0 Likes
774

CONVERT_DATE_TO_EXTERNAL.

CONVERT_DATE_TO_INTERNAL.

DATE_STRING_CONVERT

Function Modules related to Date and Time Calculations

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

or

simple use:

WRITE date to ext_date MMDDYYYY.

date is in YYYYMMDD for mat type d

and ext_date(8) type c

or

data: l_date(10) type c.

write: sy-datum to date.

write : date.

regards,

srinivas

<b>*rewards for useful answers* </b>

Read only

Vijay
Active Contributor
0 Likes
774

Hi

just use the FM <b>'CONVERT_DATE_TO_INTERNAL'</b>

it will solve your problem.

regards

vijay

<b>reward points if helpful</b>

Read only

Former Member
0 Likes
774

Hi,

Use Function module <b>HRGPBS_HESA_DATE_FORMAT</b>

Regards

Sudheer

Read only

Former Member
0 Likes
774

Hi,

Use function module

CONVERT_DATE_TO_EXTERNAL.

Pls reward all helpful points.

Regards,

Ameet