Tool
SQL Unix Timestamp Snippets
SQL examples for Unix timestamp work across MySQL, PostgreSQL, and SQLite, including current epoch values, conversion to dates, and conversion back to timestamps.
SQL timestamp basics
Each database exposes Unix timestamp helpers with slightly different names. MySQL uses UNIX_TIMESTAMP(), PostgreSQL can extract epoch seconds from now(), and SQLite commonly uses strftime('%s', 'now').
Database conversion notes
Store timestamps as integers when you need fast numeric comparisons, or use native timestamp types when you need database-level timezone and date functions. Be explicit about UTC at import and export boundaries.