DATE Functions tutorial in PHP

If we want to get current date then we can use below shown sql query :

SELECT CURRENT_DATE();            OR      We can use

SELECT CURDATE();


If we want to get current date with time then we can use below sql query :

SELECT SYSDATE();

we can also use 

SELECT NOW();

If we want to find out month from sql query then we can use below shown sql query :

SELECT MONTH("2019-10-15 09:34:21") AS DATE;

Comments

Popular posts from this blog

GROUP BY Clause and HAVING Clause in PHP

Method Overriding in Traits in PHP

Mysqli database Connection and Display Table Data from Database