GET TIME STAMP FIELD f

GET

Effect

Returns the time stamp in either short or long form. The short form consists of the current date and time. The long form contains date and time with seven decimal places for fractions of a second. This gives accuracy to 100 nanoseconds.

The target field f contains the global reference time UTC (Universal Time Coordination). This corresponds to Greenwich Mean Time, which was used previously.

f must have type P(8) for the short form, or P(11) DECIMALS 7 for the long form. Structure TZONREF in the ABAP Dictionary contains reference fields that you can use in a DATA ... LIKE ... statement to define the data type.

Note

You cannot manipulate the time stamp in the same way that you can manipulate ABAP date or time data types. The system contains other elements that convert the time stamp into date and time (accurate to one second) and output it.

The fractions of a second used in the long form are platform-dependent. The time on some platforms will only be accurate to one millisecond.

Example

DATA:  s_timestamp LIKE tzonref-tstamps, 
	 l_timestamp LIKE tzonref-tstampl. 
 
GET TIME STAMP FIELD s_timestamp.	"Kurzform 
GET TIME STAMP FIELD l_timestamp.	"Langform 
 
WRITE: / s_timestamp, l_timestamp. 
 

The short form might then contain the value 19980204163520, the long form, the value 19980204163520,1234560.

Related

GET TIME

CONVERT TIME STAMP ....

WRITE f TIME ZONE ....