second
This function is used to return the second (from 0 to 59) of a specified time.
Syntax
second(string date)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
date |
Yes |
DATE or STRING |
Date that needs to be processed
The following formats are supported:
|
Return Values
The return value is of the INT type.
- If the value of date is not of the DATE or STRING type, the error message "data type mismatch" is displayed.
- If the value of date is of the DATE or STRING type but is not in one of the supported formats, NULL is returned.
- If the value of date is NULL, NULL is returned.
Example Code
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);
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot