System Class for Time Stamp Fields
The Class Library contains the following system class for handling time stamps in time stamp fields:
This class provides the following methods:
- DIFF for calculating time differences.
- READ for reading a time stamp from a string.
The attributes MIN and MAX contain the minimum and maximum values of the time stamp type
7.31 | 7.40 | 7.54
An initial time stamp passed to the method DIFF is handled here like the lowest possible value of a time stamp.
Compares the method DIFF with the built-in function
DATA(ts_low) = utclong_current( ). DATA(ts_high) = utclong_add( val = ts_low seconds = 100000 ). DATA(diff) = utclong_diff( high = ts_high low = ts_low ). cl_abap_utclong=>diff( EXPORTING high = ts_high low = ts_low IMPORTING days = DATA(days) hours = DATA(hours) minutes = DATA(minutes) seconds = DATA(seconds) ). ASSERT diff = 100000. ASSERT diff = 86400 * days + 3600 * hours + 60 * minutes + seconds.