The NOW function returns the current date and time according to the database environment in systems that support it.
NOW provides a convenient way to obtain a timestamp for calculations, filtering, and reporting.
Display the current date and time.
SELECT
NOW() AS CurrentDateTime;
NOW is commonly used in MySQL and some other systems for timestamps, logging, and date-time calculations.
- NOW returns the current date and time.
- It is common in some database systems.
- It can be used in date calculations.
- Equivalent functions differ between databases.
- Time zone behavior should be considered.
What does NOW return?
NOW returns the current date and time in database systems that support the function.
Is NOW available in every SQL database?
No. Different database systems use different functions for retrieving the current date and time.