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 functon module

Former Member
0 Likes
1,005

Hi All,

Coud you please some body let me know what is the function module that I can use to convert date format to user specific date format.Using the function module SLS_MISC_GET_USER_DATE_FORMAT I am getting the date format settings of that particular user after that how to convert my dateformat(MM.DD.YYYY always) to the userspecific format.

Regards

Mahesh

5 REPLIES 5
Read only

former_member210123
Active Participant
0 Likes
972

this command is more than useful i suppose.

WRITE sy-datum TO:

date_mask DD/MM/YYYY.

Read only

0 Likes
972

This function module is usally used for this purpose.It also checks the whether the entred date is correct.DATE_CONV_EXT_TO_INT

Read only

Former Member
0 Likes
972

Hi,

Use DATE_CONV_EXT_TO_INT.

Reward points if this helps,

Kiran

Read only

Former Member
0 Likes
972

Hi ,

Make use of FM.

FORMAT_DATE_4_OUTPUT

example.

Import parameters Value

DATIN 01.02.2007

FORMAT MM.DD.YYYY

Export parameters Value

DATEX 02.01.2007

Regards,

Balakumar.G.

Reward Points if helpful.

Read only

Former Member
0 Likes
972

hi,

the function module is DATE_CONV_EXT_TO_INT

or you can change date format by

ate-date = sy-datum.

APPEND date.

DATA: dd TYPE string.

DATA: mm TYPE string.

DATA: yyyy TYPE string.

LOOP AT date.

dd = date-date+6(2).

mm = date-date+4(2).

  • yyyy = date-date+0(4).

yyyy = date-date+2(2).

CONCATENATE dd yyyy mm INTO date-date1.

  • WRITE sy-datum DDMMYY.

MODIFY date .

ENDLOOP.

if helpful give rewards points

regards,

pankaj vashista