MICROSECOND


The MICROSECOND function accepts a single argument and returns an integer data type.

MICROSECOND.png

expression must return one of the following built-in data types:

  • TIMESTAMP
  • TIMESTAMP WITH TIMEZONE
  • TIMESTAMP DURATIONA timestamp duration occurs as the result of subtracting two timestamps of precision=6. The result is the microsecond portion of the derived timestamp or timestamp duration.


Warning

Important

A CHAR/VARCHAR argument is not accepted unless converted by a TIMESTAMP or TIMESTAMP_TZ function.

If the argument can be null, the result can be null; if the argument value is null, the result is the null value.

Information
Example
MICROSECOND (TIMESTAMP ('1991-12-31-13.30.05.123456'))

results in an integer of value = 123456 It is invalid to specify MICROSECOND (’1991-12-31-13.30.05.123456’) because the argument is of type CHAR.

Information
Example
MICROSECOND (TIMESTAMP ('1991-12-31-13.30.05.123456') - TIMESTAMP ('1991-12-31-13.30.05.123456'))

results in an integer of value = 0

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Utility Manager for Db2 13.1