User Tools

Site Tools


abap:time

This is an old revision of the document!


Time

Timestamp

ABAP propose différents moyens pour obtenir un timestamp mais comme d'hab dès qu'on parle de time, gare à la timezone ! Pour faire le choses simplement, on peut utiliser la classe cl_abap_tstmp.

* Get timestamp from date
CALL METHOD cl_abap_tstmp=>systemtstmp_syst2utc
  EXPORTING
    syst_date = wlv_date
    syst_time = wlv_time
  IMPORTING
    utc_tstmp = wlv_ts.
* Get date from timestamp
  CALL METHOD cl_abap_tstmp=>systemtstmp_utc2syst
    EXPORTING
      utc_tstmp = wlv_ts
    IMPORTING
      syst_date = wlv_date
      syst_time = wlv_time.
abap/time.1443455924.txt.gz · Last modified: 2015/09/28 17:58 by ginko