bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL LOCALTIME() Function

Concept visual

MySQL LOCALTIME() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return current date and time:

Select

LOCALTIME();

Definition and Usage

The LOCALTIME() function returns the current date and time.

Note:

Formula

The date and time is returned as "YYYY - MM - DD HH - MM - SS"

(string) or as YYYYMMDDHHMMSS.uuuuuu (numeric).

Syntax

Localtime()

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Formula

Return current date and time + 1:

Select

LOCALTIME() + 1;

Previous

❮ MySQL Functions

Next

Previous

MySQL LAST_DAY() Function

Next

MySQL LOCALTIMESTAMP() Function