Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $date_query = array(
- 'column' => 'post_date',
- 'relation' => 'OR',
- // After 2 PM
- array(
- 'hour' => 14,
- 'compare' => '>',
- ),
- // Before 11:43:23 AM
- array(
- 'hour' => 11,
- 'minute' => 43,
- 'second' => 23,
- 'compare' => '<',
- ),
- array(
- 'inclusive' => true,
- 'after' => '2010-09',
- 'before' => array(
- 'year' => 2011,
- 'month' => 9,
- 'day' => 10,
- 'hour' => 16,
- 'minute' => 25,
- 'second' => 32,
- )
- ),
- array(
- 'before' => array(
- 'year' => 2002,
- ),
- ),
- );
- /*
- ( 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' )
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement