Timestamps stored as plain integers are easy to sort and compare, but a pain to type by hand. SQLite has a small function that does the conversion for you, and it saves me from looking up epoch numbers on a website.
SELECT unixepoch('2026-01-01 00:00:00');
-- 1767225600
With no argument, unixepoch() returns the current time as whole seconds since 1970-01-01 00:00:00 UTC. Pass a date string and it returns that moment instead. It accepts the same time strings and modifiers as date() and datetime(), so this works as well:
SELECT count(*) FROM events
WHERE created_at >= unixepoch('now', '-7 days');
That counts the rows of the last week in a table that stores epoch seconds.
Going the other way, datetime(1767225600, 'unixepoch') gives you the readable string again.
Two details. The result is an integer unless you add the subsec modifier, which returns a float with millisecond precision. And the auto modifier guesses whether a number is a Unix timestamp or a Julian day, but it misreads timestamps from the first 63 days of 1970, so I would only use it when I know my data cannot contain such dates. Everything is UTC unless you add the localtime modifier.
Further reading: SQLite date and time functions