0

I have database "raj" with table "pagination"

In table pagination have "id", "actualtime" and "created" field

id - auto_increment actualtime- varchar created- datetime

that looks like this CREATE TABLE pagination( id int auto_increment, actualtime varchar(55), created datetime )

I want to display all rows which are created on todays date and will display from today upto yesterday at 06:00 pm. after that the content will be refreshed based on based on a DATETIME field called 'created' that holds the date and time of each record's creation.

this is my query to fetch rows but it display value after 06:00 pm on yesterday but i want to display all data before 06:00 pm from currentdate. After 06:00 pm data will be refreshed and clear. plz help me......

SELECT actualtime FROM pagination WHERE created BETWEEN date_add(date_sub(curdate(), INTERVAL 1 day), INTERVAL 18 hour) AND curdate()";

marked as duplicate by ypercubeᵀᴹ mysql Nov 5 '16 at 11:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.