06-19-2007 4:58 PM
Hi All,
Acc to my requirement I want to get the date(YYYY-MM-DD) from the 15 digit decimal timestamp.
Is there any FM to get the date out from the timestamp.
Thanks in Advance,
Praveen
06-19-2007 5:07 PM
hi Praveen,
date = timestamp+0(8)
time = timestamp+8(6).
else try this way
convert time stamp wa_rseqdone_ts
time zone sy-zonlo
into date wa_ts_date
time wa_ts_time.
check this link for full details
http://www.bwexpertonline.com/downloads/DBConnectMakingDELTAABAPCode.doc
Regards,
Santosh
06-19-2007 5:03 PM
Hi
do the offsetting of that timestamp field and take the 8 char date field
or by offsetting separate the YYYY, MM and DD fields and concatenate them again
Reward points for useful Answers
Regards
Anji
06-19-2007 5:04 PM
Hi Praveen,
Use FM <b>HRIQ_PROC_DH_TIMESTMP_DATETIME</b>
Regards
Aneesh.
06-19-2007 5:04 PM
Hi,
You can use the syntax
CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t.
DATA:
tstamp TYPE timestamp,
d TYPE D VALUE '19971224',
t TYPE T VALUE '235500'.
SET COUNTRY 'US'.
CONVERT DATE d TIME t INTO
TIME STAMP tstamp TIME ZONE 'UTC+12'.
" tstamp : 19971224115500
" (12/24/1997 11:55:00)
CONVERT TIME STAMP tstamp TIME ZONE 'UTC+12' INTO
DATE d TIME t.
WRITE: (10) d, " 12/24/1997
/, (8) t. " 23:55:00
Thanks
Naren
06-19-2007 5:07 PM
hi Praveen,
date = timestamp+0(8)
time = timestamp+8(6).
else try this way
convert time stamp wa_rseqdone_ts
time zone sy-zonlo
into date wa_ts_date
time wa_ts_time.
check this link for full details
http://www.bwexpertonline.com/downloads/DBConnectMakingDELTAABAPCode.doc
Regards,
Santosh
06-20-2007 4:22 AM