NOW() in MySQL — How It Works
What the MySQL NOW() function does, with an example.
Published October 19, 2026
NOW() returns the current date and time in the session time zone as a DATETIME. SYSDATE() differs by returning the time at execution of each call.
How it works
NOW() is constant within a statement, which keeps rows consistent.
Try it in MySQL
SELECT NOW()
2026-11-12 14:03:11
SELECT NOW(3)
2026-11-12 14:03:11.482
INSERT INTO log(created_at) VALUES (NOW())
1 row
Practical examples
Example 1
SELECT NOW();
-- 2026-11-12 14:03:11Example 2
SELECT NOW(3);
-- 2026-11-12 14:03:11.482Example 3
INSERT INTO log(created_at) VALUES (NOW());
-- 1 rowUse it in a real query
SELECT id, NOW() AS result
FROM your_table
LIMIT 10;Common mistakes
- Ignoring session time zones.
- Using NOW() for dates only (use CURDATE).
- Comparing DATETIME columns to strings in different formats.
Key takeaways
- NOW() in one line: NOW() returns the current date and time in the session time zone as a DATETIME.
- Try queries in a test database first.
- Check NULL handling and data types.
FAQ
NOW vs CURRENT_TIMESTAMP?
They are synonyms.
Does NOW() work in other databases?
Most have an equivalent, but names and syntax vary between MySQL, PostgreSQL, SQL Server and SQLite.