Application Development 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: 

Convert date to timestamp- Very urgent

Former Member
0 Kudos

Hi friends,

I have a very urgent requirement to convert date to timestamp.

Please help me out ASAP.

Thanks & regards,

Srilakshmi B

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

check the following ABAP statements:


GET TIME STAMP
CONVERT DATE

Reward points, if answer meets your expectation

0 Kudos
get time stamp field <ur field>