TIME()

Description

Extracts the time part of the time or datetime expression expr and returns it as a string. Returns NULL if expr is NULL.

Syntax

1. > TIME(expr)

Arguments

Arguments Description
expr Required. The date/datetime to extract the time from.

Examples

1. mysql> SELECT TIME('2003-12-31 01:02:03');
2. +---------------------------+
3. | time(2003-12-31 01:02:03) |
4. +---------------------------+
5. | 01:02:03                  |
6. +---------------------------+
7. 1 row in set (0.01 sec)