MySQL LOCALTIME() Function

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

LOCALTIME() Function

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

LOCALTIME() Syntax

SELECT LOCALTIME();

LOCALTIME() Parameter(s)

  • This function does not accept any parameter.

LOCALTIME() Return Value

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

MySQL LOCALTIME() Function Example 1

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

MySQL LOCALTIME() Function Example 2

SELECT LOCALTIME()+9;
Example 2: MySQL LOCALTIME() Function


Comments and Discussions!

Load comments ↻





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