Languages
[Edit]
EN

MySQL - get current date and time

0 points
Created by:
WGates
412

In this article, we would like to show you how to get the current date and time in MySQL.

Quick solution:

SELECT NOW();

 

Practical example

In this example, we will display the current date and time as current_datetime using NOW() function.

Query:

SELECT NOW() AS 'current_datetime';

Result:

MySQL - NOW() function result
MySQL - NOW() function result

Alternative titles

  1. MySQL - select current datetime
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

MySQL - dates

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join