Reference Guide > TDV Support for SQL Functions > Date Functions > MIDNIGHT_SECONDS
 
MIDNIGHT_SECONDS
The MIDNIGHT_SECONDS function returns an integer, in the range 0 - 86400, that represents the number of seconds between midnight and the time that is specified in the argument.
Syntax
MIDNIGHT_SECONDS(expr)
Example
SELECT MIDNIGHT_SECONDS('2020-06-20 11:20:52.000321')