MySQL LOCALTIMESTAMP() Function

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

LOCALTIMESTAMP() Function

The LOCALTIMESTAMP() function is used to get the current date and time, this function is also a synonym of the NOW() function.

LOCALTIMESTAMP() Syntax

SELECT LOCALTIMESTAMP();

LOCALTIMESTAMP() Parameter(s)

  • This function does not accept any parameter.

LOCALTIMESTAMP() Return Value

This function returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDhhmmss format.

MySQL LOCALTIMESTAMP() Function Example 1

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

MySQL LOCALTIMESTAMP() Function Example 2

SELECT LOCALTIMESTAMP()+8;
Example 2: MySQL LOCALTIMESTAMP() Function


Comments and Discussions!

Load comments ↻





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