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

Former Member
0 Likes
429

Hi gurus,

here is one problem with date.in my excel sheet i had a date like (19-june-99).Now im uploading data from excel to internal table.So when im triying to upload to sap .It is not accepting.it gives error message like uploading date should be (19.06.99) in this format.But im not changing in excel that is not possible.Pls help me out on this issue.

thanks in advance best solution will be revarded

2 REPLIES 2
Read only

Former Member
0 Likes
402

if changing date in excel is not an option then you must convert the date during upload - u need to upload the data then use some conversion logic on the date before saving to the internal table.

Read only

Former Member
0 Likes
402

use this code to convert excel date...

DATA : month(10), mm(2), dd(2), yy(2).

DATA : exel_date(16) VALUE '19-June-99'.

DATA : date(8).

SPLIT exel_date AT '-' INTO dd month yy.

SELECT SINGLE mnr INTO mm FROM t247 WHERE ltx = month AND spras = sy-langu.

CONCATENATE dd mm yy INTO date SEPARATED BY '-'.

WRITE 😕 date.