I have a tabel in MYSQL database that has 2 columns.
1- start_date
2- end_date
the above columns both hold DATETIME like so:
start_date end_date
2019-10-03 13:30:00 2020-10-03 23:30:00
I need to select from the MYSQL table ONLY if the current date is between the start_date and end_date.
So i tried this MYSQL Query:
SELECT * FROM table WHERE `end_date` >= CURDATE() AND `start_date` <= CURDATE()
but this doesn't work and doesn't return anything from the database even thogh the the current date is between the start_date and end_date.
Could someone please advice on this?
>= CURDATE()and less than today<= CURDATE()at the same time.