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

problem in date format urgent.

Former Member
0 Likes
1,528

hi everyone,

i am developing a report in that i am passind date as DDMMYYYY, here i am not seeing any output in report that output should be sent to customet trrow mail as excel sheet,

i am succeded in that but i am getting date format problem.

that is he want to upload that file into sap, in that that the date format is YYYY / MM / DD. but i am unable to do that.

i used this stmts for that.

Concatenate v_string0(4) v_string4(2) v_string+6(2) into v_date SEPARATED BY '/' .

concatenate c_equal c_colon v_date c_colon into v_date.

but it is giving ="YYYY / MM / DD" if i remove the second stmt it is giving DDMMYYYY only can you help me in this issue.

i need that format as YYYY / MM / DD.like this.

regards,

chaithu.p

hi kusuma.

i dont want = and " " also if i remove those two or one of them i am getting output as DD/ MM/ YYYY ok.

14 REPLIES 14
Read only

Former Member
0 Likes
1,492

Hi Chaitanya,

U r question is not clear,

U said ( but it is giving ="YYYY / MM / DD" ) this format and again u r asking u want ( i need that format as YYYY / MM / DD.like this. ).

What format u want exactly.

Regards,

Narasimha

Read only

0 Likes
1,492

hi narasimha

the problem is this i am getting output as ="YYYY / MM / DD"

as it is that = and " " colons are also comming but i dont want that.

i want YYYY / MM / DD.ok is it clear to you.

Read only

Former Member
0 Likes
1,492

Use this code.

Concatenatev_string6(2)v_string4(2) v_string+0(4) into v_date SEPARATED BY '/' .

concatenate c_equal c_colon v_date c_colon into v_date.

Regards,

Madan.

Edited by: madan mohan reddy on May 8, 2008 10:08 AM

Read only

0 Likes
1,492

hey madan

plz understand my problem read the upper case properly and give me reply.

ok

Read only

0 Likes
1,492

Hi,

Use this.

v_date0(4) = sy-datum0(4)

v_date+4(1) = '/'

v_date5(2) = sy-datum4(2)

v_date+7(1) ='/'

v_date8(2) =sy-datum6(2)

Reward points if useful.

Read only

0 Likes
1,492

Hi use this code.

data : v_date type char20.

v_date0(4) = sy-datum0(4).

v_date+4(1) = '/'.

v_date5(2) = sy-datum4(2).

v_date+7(1) ='/'.

v_date8(2) = sy-datum6(2).

write: v_date.

Give the date for which u want to convert instead of sy-datum.

Reward points if useful

Read only

0 Likes
1,492

no it is not working it is giving DDMMYYYY format only

Read only

0 Likes
1,492

Hi,

Try this code,

DAta: v_string(8) type c value 'ddmmyyyy',

v_date(13) type c.

Concatenate v_string4(4) v_string2(2) v_string+0(2) into v_date

SEPARATED BY '/' .

concatenate '=' ` ` v_date into v_date.

write: v_date.

I have executed this code and it is giving out put as

= yyyymmdd.

regards,

kk.

Read only

0 Likes
1,492

I have executed it . it's giving in YYYY/MM/DD format. just execute this code and see it's giving in the YYYY/MM?DD format

data : v_date type char20.

v_date0(4) = sy-datum0(4).

v_date+4(1) = '/'.

v_date5(2) = sy-datum4(2).

v_date+7(1) ='/'.

v_date8(2) = sy-datum6(2).

write: v_date.

Read only

0 Likes
1,492

hi mohd,

i also tried that may the excel sheet converting that date format, ok thanks for your reply if execute your code it is working fine in sap , but not in excel sheet. ok anyway thanks .

Read only

Former Member
0 Likes
1,492

Hi,

Ur v_string = DDMMYYYY right,

so use concatenate statement as follows,

Concatenate v_string4(4) v_string2(2) v_string+0(2) into v_date SEPARATED BY '/' .

concatenate c_equal ` ` v_date into v_date.

if u don't want '=' also remove that from concatenate statement.

i think this will give u correct order.

Regards,

kk.

Edited by: kusuma kurapati on May 8, 2008 7:05 AM

Read only

0 Likes
1,492

hi kusuma.

i dont want = and " " also if i remove those two or one of them i am getting output as DD/ MM/ YYYY ok.

Read only

Former Member
0 Likes
1,492

thanks for every one who contributed in this

discussion

Read only

Former Member
0 Likes
1,492

Dear,

USE EDIT MASK.