subsec

Applies the subsec modifier to a date/time value, enabling fractional second precision.

This modifier tells SQLite's date and time functions to process the fractional part of seconds when performing calculations. It must appear after all other time-modifying clauses (+N days, +N hours, etc.). When used, subsec ensures that any fractional seconds from the original time string are preserved through the calculations. This behavior was introduced in SQLite version 3.22.0.

Example

// Add 5 seconds while preserving fractional seconds
select(DATETIME("2024-07-15 10:20:30.500").seconds(5).subsec()).execute()

Note: This function is an alias for subsecond().

Return

A KQLiteColumn with the 'subsec' modifier applied.

Author

MOHAMMAD AZIM ANSARI

See also