DateTime Functions
# StreamSQL DateTime Functions
DateTime functions are used for handling date and time data.
# NOW - Current Date/Time Function
Syntax: now()
Description: Returns the current date and time as a time.Time (nanosecond precision), aligning with MySQL NOW() / eKuiper NOW() datetime semantics.
# CURRENT_TIME - Current Time Function
Syntax: current_time()
Description: Returns the current time.
# CURRENT_DATE - Current Date Function
Syntax: current_date()
Description: Returns the current date.
# UNIX_TIMESTAMP - Unix Timestamp Function
Syntax: unix_timestamp([datetime])
Description: Returns the Unix timestamp in seconds (int64). With no argument returns the current Unix seconds (aligns with MySQL UNIX_TIMESTAMP()); the argument may be a time.Time, date string, or numeric (numeric treated as Unix seconds).
Example: unix_timestamp('2020-01-01 00:00:00') → 1577836800
# 📚 Related Documentation
- Conversion Functions - Learn detailed usage of conversion functions
- JSON Functions - Learn detailed usage of JSON functions
- SQL Reference - View complete SQL syntax reference
Edit this page on GitHub (opens new window)
Last Updated: 2026/07/29, 07:07:39