Skip to main content

date_to_days

Function date_to_days 

Source
pub unsafe fn date_to_days(date: Date) -> Option<i32>
Expand description

Composes a calendar date into a DATE (days since 1970-01-01).

Returns None if DuckDB cannot represent the date — a month outside 1–12, a day the month does not have, or a year beyond DuckDB’s range; see is_valid_date. DuckDB throws on such a date, which would abort the process, so it is checked here first.

§Safety

See date_from_days.