MySQL NOW() Function

MySQL | NOW() Function: Learn about the NOW() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 10, 2022

NOW() Function

The NOW() function is just another synonym of the function LOCALTIMESTAMP() function, CURRENT_TIMESTAMP() function. It is used to get the current date and time.

NOW() Syntax

SELECT NOW();

NOW() Parameter(s)

  • It does not accept any parameter.

NOW() Return Value

The function returns the current date and time in the format of 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDhhmmss.

MySQL NOW() Function Example 1

SELECT NOW();
Example 1: MySQL NOW() Function

MySQL NOW() Function Example 2

SELECT NOW() +7;
Example 2: MySQL NOW() Function


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.