Jump to content

Select By today's date


Nexy

Recommended Posts

provided you have the date in raw format(strtotime format), you can do either..

 

I have a get_midnight function which basically gets the day today and calculates the exact second that midght today hit and then I do a query for everything with a date greater than that value. That'd give you everthing that was done today.

 

Hope that helped  :)

 

 

 

Edit: here's the get_midnight function..

 

function get_midnight($timestamp)

{

  $day = date("j", $timestamp);

  $month = date("F", $timestamp);

  $year = date("Y", $timestamp);

 

  $midnight = strtotime("$month $day $year");

 

  return $midnight;

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.