sapachon y abapachon

agosto 11, 2008

Convertir de timestamp a date y de date a timestamp

Archivado en: ABAP, Conversiones, SAP — sapachon @ 8:15 pm

Date to Timestamp

*&———————————————————————*
*& Form convert_date_to_timestamp
*&———————————————————————*
form convert_date_to_timestamp using par_date
par_time
par_time_zone
changing par_timestamp.
clear par_timestamp.
CONVERT DATE par_date TIME par_time INTO
TIME STAMP par_timestamp TIME ZONE par_time_zone.
endform.
” convert_date_to_timestamp

Timestamp to Date

*&———————————————————————*
*& Form convert_timestamp_to_date
*&———————————————————————*

form convert_timestamp_to_date using par_timestamp
par_time_zone
changing par_date
par_time.
data: lc_timestamp type timestamp.
clear: par_date, par_time, lc_timestamp.
lc_timestamp = par_timestamp.
CONVERT TIME STAMP lc_timestamp TIME ZONE par_time_zone INTO
DATE par_date TIME par_time.
endform.
” convert_timestamp_to_date

Tema Silver is the New Black. Blog de WordPress.com.

Seguir

Get every new post delivered to your Inbox.