Title: Date_query, particular case
Last modified: August 21, 2016

---

# Date_query, particular case

 *  [otta88sun](https://wordpress.org/support/users/otta88sun/)
 * (@otta88sun)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/date_query-particular-case/)
 * Hi, i’m trying to make a query that call all posts **published** after 2 months
   ago. Looking WP codex I realized something like this:
 *     ```
       $args = array(
       	'post_type' => 'post',
       	'date_query' => array(
       		array(
       			'column' => 'post_date_gmt',
       			'after'  => '2 month ago',
       		)
       	)
       );
       ```
   
 * I can’t test it. For you will it work? My only “?” is in the after => ‘2 month
   ago’. Or should it be ‘2 months ago’?
    In Codex was only wrote “See WP_Date_Query::
   build_mysql_datetime()’, “
 * but found anything…

The topic ‘Date_query, particular case’ is closed to new replies.

## Tags

 * [date_query](https://wordpress.org/support/topic-tag/date_query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [otta88sun](https://wordpress.org/support/users/otta88sun/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/date_query-particular-case/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
