This function is used to return the second (from 0 to 59) of a specified time.
second(string date)
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
date |
Yes |
DATE or STRING |
Date that needs to be processed The following formats are supported:
|
The return value is of the INT type.
The value 36 is returned.
select second('2023-08-16 10:54:36');
The value 36 is returned.
select second('10:54:36');
The value NULL is returned.
select second('20230816105436');
The value NULL is returned.
select second(null);