Title: date parameter &#8216;after&#8217; to query string
Last modified: October 21, 2016

---

# date parameter ‘after’ to query string

 *  [Andrew](https://wordpress.org/support/users/snd26/)
 * (@snd26)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/date-parameter-after-to-query-string/)
 * How do you write the ‘after’ date parameter as a URL query string?
 * To write these date parameters as a query string:
 *     ```
       $args = array(
       	'date_query' => array(
       		array(
       			'year'  => '2016',
       			'month' => '10',
       		),
       	),
       );
       ```
   
 * you just do `year=2016&month=10` as mentioned here: [https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters](https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters)
   These work perfectly fine
 * How do you write the the following as a query string:
 *     ```
       $args = array(
       	'date_query' => array(
       		array(
       			'after'  => '1 month ago',
       		),
       	),
       );
       ```
   
    -  This topic was modified 9 years, 7 months ago by [Andrew](https://wordpress.org/support/users/snd26/).
    -  This topic was modified 9 years, 7 months ago by [Andrew](https://wordpress.org/support/users/snd26/).
    -  This topic was modified 9 years, 7 months ago by [Andrew](https://wordpress.org/support/users/snd26/).

The topic ‘date parameter ‘after’ to query string’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Andrew](https://wordpress.org/support/users/snd26/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/date-parameter-after-to-query-string/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
