‎2009 Apr 14 12:26 PM
Hi Experts,
Currently I have the date in the format of 2.009010100000000E+07 I need
to change it into 2009.01.01.
Please any one suggest me how we can do this.
Thnx,
Sam.
‎2009 Apr 14 12:28 PM
‎2009 Apr 14 12:28 PM
‎2009 Apr 14 12:32 PM
Hello ,
Use EDIT MASK ..and input the format you want.
Re, Manas
‎2009 Apr 14 12:32 PM
Hi,
Move the data to the char field and read the first 7 char into another varaible and replace the dot space and condense the variale.
Now you left with date value..move this to variable with Dats type.
‎2009 Apr 14 12:37 PM
Hi Sam,
Use the below sample code.
DATA : VAR_DATE(10) TYPE C.
WRITE DATE TO VAR_DATE YYYY.MM.DD.
‎2009 Apr 14 12:39 PM
Hi Sam,
try these below functiomodule it converts the datetimestamp to date and time..
then you can convert the date into user defined format..
FRE_CONVERT_TIMESTAMP_2_DATE
LXHME_TIMESTAMP_CONVERT_FROM
LTRM_TIMESTAMP_CONVERT_FROM
I hope this will work for you..
Regards,
Prabhudas
‎2009 Apr 14 12:41 PM
Hi,
Try this
DATA
: NO TYPE F VALUE '2.009010100000000E+07',
OP TYPE CHAR30,
DATE TYPE SY-DATUM.
CALL FUNCTION 'C14W_NUMBER_CHAR_CONVERSION'
EXPORTING
I_FLOAT = NO
* I_DEC = 0
* I_DECIMALS = 0
IMPORTING
E_STRING = OP
* E_FLOAT =
* E_DEC =
* E_DECIMALS =
* EXCEPTIONS
* NUMBER_TOO_BIG = 1
* OTHERS = 2
.
REPLACE ALL OCCURRENCES OF ',' IN OP WITH SPACE.
DATE = OP+0(8).
WRITE DATE.Regards