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
955

Hi all..

i'm getting date 10.01.0001.

i want date should be 10/01/0001.

how to insert '/' between for the following code.

DATA : DATE TYPE DATS,

NUMBER TYPE I VALUE 10,

RESULT TYPE DATS.

RESULT = DATE + NUMBER.

WRITE : RESULT.

regards

Suprith

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
928

Hi,

try this.

data: v_date type char10.
write sy-datum to v_date.
translate v_date using './'.
write / v_date.

Darren

8 REPLIES 8
Read only

Former Member
0 Likes
928

Hi,

Change the date format in User settings.

System-> user profile- > own data

Sudheer. A

Read only

Former Member
0 Likes
928

try using WRITE .. USING EDIT MASK '...'

Read only

Former Member
0 Likes
928

Hi,


	DATA : dates11 TYPE string,
	     dates1 TYPE string,
	     dates2 TYPE string.
DATA : dates TYPE string VALUE '12.12.1998'.
	dates11 = dates+0(2).
	dates1 = dates+3(2).
dates2 = dates+6(4).

Read only

Former Member
0 Likes
929

Hi,

try this.

data: v_date type char10.
write sy-datum to v_date.
translate v_date using './'.
write / v_date.

Darren

Read only

former_member342104
Participant
0 Likes
928

data : str1 type string,str2 type string,str3 type string.

str1 = result+0(2).

str2 = result+2(2).

str3 = result+4(4).

CONCATENATE str1 str2 str3 INTO result SEPARATED BY '/'.

Read only

Former Member
0 Likes
928

Hi this will solve ur problem...

WRITE RESULT USING EDIT MASK '__/__/_____'.

Edited by: Sukriti Saha on Oct 23, 2008 4:47 PM

Read only

Former Member
0 Likes
928
WRITE (10) result USING EDIT MASK '____/__/__'.
Read only

former_member125931
Active Participant
0 Likes
928

U can use replace statement,Replace '.' with '/'.