Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Calculate a future or past date by adding or subtracting an interval from an existing date.
Find how many days separate two date values using each engine's date difference function.
Shift a stored UTC timestamp to a local time zone for display using engine-specific conversion functions.
Strip the time portion from a timestamp so only the calendar date remains.
Find rows whose date or timestamp intervals intersect by checking that neither range ends before the other begins — using the `OVERLAPS` operator in PostgreSQL or a manual comparison in other engines.
Return components such as year, month, and day from a date or timestamp value.
Return the year component from a date or timestamp value.
Produce a row for every date in a range — even dates with no data — by generating a date spine and left-joining actual records onto it.
Convert a date value to a formatted string using a custom pattern such as MM/DD/YYYY.
Return the current date and time using `CURRENT_TIMESTAMP` or engine-specific functions.
Return the weekday number or name for a date using engine-specific date functions.
Bucket dates into month starts, then aggregate counts or totals per month.
Convert a text string in a known format into a native DATE value using engine-specific parsing functions.
Truncate a timestamp to the start of a month, day, or hour using engine-specific functions.