Skip to Content
0
Feb 16, 2015 at 05:29 PM

Convert Timestamp to Date foarmat

3150 Views

Hi,

Iam trying to write the field routine to convert to date format from Timestamp field, My requirement is to get only month from this Timestamp field)

But the below code is not working, can anyone tell me the correct code for this?

Source Field-->RESOLVE_Time(15)

BI Field----->BRESLD(08)

data: lc_timestamp type timestamp,

RESOLVE_TIME type SY-TZONE,

/BIC/BRESLD(08) type sy-datum.

lc_timestamp = RESOLVE_TIME

CONVERT TIME STAMP lc_timestamp TIME ZONE sy-zonlo INTO

DATE /BIC/BRESLD .

/BIC/BRESLD = SOURCE_FIELDS-RESOLV_TIME+0(8).

RESULT = /BIC/BRESLD.

Thanks