Advertisement
Viper007Bond

Untitled

Sep 19th, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. $date_query = array(
  2.     'column' => 'post_date',
  3.     'relation' => 'OR',
  4.  
  5.     // After 2 PM
  6.     array(
  7.         'hour' => 14,
  8.         'compare' => '>',
  9.     ),
  10.  
  11.     // Before 11:43:23 AM
  12.     array(
  13.         'hour' => 11,
  14.         'minute' => 43,
  15.         'second' => 23,
  16.         'compare' => '<',
  17.     ),
  18.  
  19.     array(
  20.         'inclusive' => true,
  21.         'after' => '2010-09',
  22.         'before' => array(
  23.             'year' => 2011,
  24.             'month' => 9,
  25.             'day' => 10,
  26.             'hour' => 16,
  27.             'minute' => 25,
  28.             'second' => 32,
  29.         )
  30.     ),
  31.     array(
  32.         'before' => array(
  33.             'year' => 2002,
  34.         ),
  35.     ),
  36. );
  37.  
  38. /*
  39.  
  40. ( DATE_FORMAT( post_date, '%H' ) > 14.000000 ) OR ( DATE_FORMAT( post_date, '%H.%i%s' ) < 11.432300 ) OR ( post_date >= '2010-09-01 00:00:00' AND post_date <= '2011-09-10 16:25:32' ) OR ( post_date < '2002-01-01 00:00:00' )
  41.  
  42. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement