01-30-2008 10:53 AM
Hi friends,
I have a very urgent requirement to convert date to timestamp.
Please help me out ASAP.
Thanks & regards,
Srilakshmi B
01-30-2008 12:09 PM
Hi ,
FMs:
BDL_GET_CENTRAL_TIMESTAMP
DATE_2D_TO_4D_CONVERSION
DATE_CONV_EXT_TO_INT
DATE_TIME_CONVERT
Another Way
The timestamp is in the format <date><time>. for example (20072404161312), the date is 20072404 and time is 161312. You can transfer the timestamp into a string and then split the data. You can use the following ABAP code to separate the date from the time:
"w_ts is your timestamp, w_s is the temporary string
"w_date and w_time will be your final date and time.
data: w_ts type timestamp.
data: w_s type string.
data: w_date type sy-datum,
w_time type sy-uzeit.
w_ts = '20071111161312'.
w_s = w_ts.
w_date = w_s(8).
w_time = w_s+8(6).
Regards
01-30-2008 12:49 PM
check the following ABAP statements:
GET TIME STAMP
CONVERT DATE
Reward points, if answer meets your expectation
01-30-2008 1:26 PM