02-07-2008 8:10 AM
hi,
how to convert date 12/31/9999 to sap date format
Edited by: p bharath on Feb 7, 2008 9:10 AM
02-07-2008 8:21 AM
Hi,
This is used to convert the dta ei nto required format;
The CONVERT_DATE_TO_EXTERNAL function will convert an internal date, 20080125 into the user specific format which is set on the user profile. For example, it would convert this value to 01/25/2008 for me.
Also Do like this.
Data: date(10).
write sy-datum to date.
write: date.
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
02-07-2008 8:21 AM
Declare three variables like lv_day, lv_month, lv_yead. Split the date and get the values of the day, month and year in the variable.
data: lv_date (10) type c value '12/31/9999'.
lv_day(2) type c,
lv_month(2) type c,
lv_year(4) type c.
lv_day = lv_date(2).
lv_month = lv_date+4(2).
lv_year= lv_date+7(4).
now get whatever format you like by concatenating lv_day, lv_month & lv_year.
02-07-2008 8:21 AM
Hi,
do like below........
DATA: d(10) type c value '10/12/2007'.
write d.
concatenate d+6(4) d+3(2) d+0(2) into d.
write : / d.
Cheers,
jose.
02-07-2008 8:22 AM
HI,
DATA : v_date(10),
v_fstop value '.'
v_date_tmp = '12/31/9999'.
concatenate v_date_tmp+2(2) v_fstop
v_date_tmp+0(2) v_fstop
v_date_tmp+4(4) INTO v_date.
Don't forget to reward if useful...
02-07-2008 8:33 AM
Hi,
data: d1(10) type c,
d2 like sy-datum.
d1 = '12/31/9999'.
concatenate d16(4) d13(2) d1+0(2) to d2.
Please see if the code is useful.
Thanks and regards,
Atanu
02-07-2008 8:49 AM
hi
DATE_CONV_EXT_TO_INT Conversion of dates to SAP internal format .
02-07-2008 9:11 AM
Check out the standard program RSSCA1T0. This test report contains the complete date conversion with external as well as internal presentations.