Jump to content

LuckyBajpai

New Members
  • Posts

    1
  • Joined

  • Last visited

LuckyBajpai's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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()";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.