[mysql] MySQL Where DateTime is greater than today

I want to get every record from my MySQL database which is greater than today.

Sample:

"Go to Lunch","2014-05-08 12-00-00"
"Go to Bed","2014-05-08 23-00-00"

Output should only:

"Go to Bed","2014-05-08 23-00-00"

I use the DateTime for the Date Column

Already searched:

But this does not work for me.

QUERY(FOR PHP):

SELECT `name`,`date` FROM `tasks` WHERE `tasks`.`datum` >= DATE(NOW())

OR (FOR PhpMyAdmin)

SELECT `name`,`date` FROM `tasks` WHERE `tasks`.`datum` >= 2014-05-18 15-00-00;

How can I write the working query?

This question is related to mysql sql date

The answer is


SELECT * 
FROM customer 
WHERE joiningdate >= NOW();

I guess you looking for CURDATE() or NOW() .

  SELECT name, datum 
  FROM tasks 
  WHERE datum >= CURDATE()

LooK the rsult of NOW and CURDATE

   NOW()                    CURDATE()        
   2008-11-11 12:45:34      2008-11-11       

Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Examples related to sql

Passing multiple values for same variable in stored procedure SQL permissions for roles Generic XSLT Search and Replace template Access And/Or exclusions Pyspark: Filter dataframe based on multiple conditions Subtracting 1 day from a timestamp date PYODBC--Data source name not found and no default driver specified select rows in sql with latest date for each ID repeated multiple times ALTER TABLE DROP COLUMN failed because one or more objects access this column Create Local SQL Server database

Examples related to date

How do I format {{$timestamp}} as MM/DD/YYYY in Postman? iOS Swift - Get the Current Local Time and Date Timestamp Typescript Date Type? how to convert current date to YYYY-MM-DD format with angular 2 SQL Server date format yyyymmdd Date to milliseconds and back to date in Swift Check if date is a valid one change the date format in laravel view page Moment js get first and last day of current month How can I convert a date into an integer?