The date format is incorrect. I’m not sure how you have stored the date, but the format you’ve used in the query, date("MM d yy")
outputs ‘MarMar 07 1212’.
It shouldn’t really matter that the input is being done by jQuery datepicker: The input should be in a pre-specified format – so you can interpret input it as a date (or preferably DateTime) object and then format that date in this format: 2012-03-07, which in php ‘format’ is 'Y-m-d'
.
Alternatively you can store it as a time-stamp, if you are not bothered about 2038.
Finally be weary of using php date functions. WordPress sets the ‘internal’ timezone to UTC – its better to use WordPress functions which will account for the timezone of the blog.
Related Posts:
- Search custom post type by meta data
- Very slow query
- How to display liked posts of current user in wordpress?
- Filter query posts by the count of metas for a meta key
- Save default value for empty or missing post meta
- Grouping related postmeta data via SQL query
- Does meta_query work within get_posts array?
- How to show more than 5 posts?
- How to optimize my query filtering out unwanted data?
- mySQL query. ORDER BY meta_key
- get_posts() loop returns the same the_title() for each post
- Query metas (and not : query posts by metas)
- List all posts from past week grouped by sub-category
- Order posts by custom field DATE value
- How do I see the mysql query generated by get_posts( $args )?
- Issue with using add_rewrite_rule() for post querying custom fields
- Create Indexes for Slow Queries
- Query posts according to specific post meta values
- get_posts showing only 5 posts. (nopaging and posts_per_page -1 not working)
- Order by meta value pro first then meta value free in my search function
- pre saved posts query from db options table
- Re-sort get_posts query results
- get_post_meta with WP_query
- Declaring a var, placing it in a query and using the output of the query?
- Combining two meta_values within one row with query
- Can I include get_posts in this array?
- How can I get posts by 2 meta keys, prioritising one of them?
- Is there any way to get all custom posts and all custom terms with it’s meta in few queries?
- Sort by postmeta on when searching
- Category_in return empty
- Use $wpdb->get_results with filter based on array
- What is the best way to query posts based on live data?
- Custom MySQL Query for Post and Post Meta
- Sort order in get_posts [closed]
- When should you use WP_Query vs query_posts() vs get_posts()?
- How to display SQL query that ran in query?
- How can I create a meta_query with an array as meta_field?
- Query multiple meta key values?
- How to Optimize WP site for millions of posts
- order by numeric value for meta value
- Get the ID of the latest post
- How to get comments by post ID?
- WP_Query vs get_posts
- Differences between wpdb->get_results() and wpdb->query()
- Is there a way of increasing the speed of this query?
- meta_query: using BETWEEN with floats and/or casting to DECIMAL
- Get all image from single page using this query
- How can I query all users who registered today?
- Get Terms by IDs with IDs order
- Reversing the order of posts AFTER the query is performed
- what are the numbers between curly brackets in search query
- simple sql query on wp_postmeta very slow
- Using WordPress public query variables
- How to Use Wildcards in $wpdb Queries Using $wpdb->get_results & $wpdb->prepare?
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- How to get link and title of next and previous post on single page
- Create pagination and order according to alphabet
- wpdb get posts by taxonomy SQL
- How to List Events by Year and Month Using Advanced Custom Fields?
- What is the most efficient way of querying posts based on visits and date for current day?
- Is there any difference between hooks posts_where with posts_join and posts_search performance wise?
- How to organize and cache additional data associated with terms?
- wordpress query – orderby child post date
- How many WordPress SQL Queries per page?
- How to display Section for certain time
- Add multiple value to a query variable in WordPress
- Custom query_var causes displaying posts archive on front page
- How to know if get_posts() failed?
- Slow wp_enqueue_media()
- Multipart/formatted MySQL query problem
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- What is the most efficient way of implementing a favorite post system?
- Query Custom Meta Value with Increment
- Remove [gallery] shortcode altogether
- Compare two numeric custom fields
- wp_dropdown_categories with multiple select
- Advanced Custom Fields – Query Efficiency
- Why does get_the_time(‘F j’) return November 30 for all posts?
- Get posts by meta data OR title
- Query by one meta_key and sort by another (possibly NULL value)
- How to tune search argument in WP_Query to show only exactly the same results?
- Custom query filter not working on woocommerce category page
- How to delete a transient on post/page publish?
- WPDB Multiple site’s posts and get featured images
- query multiple taxonomy and show post count
- Search Terms – Querying on either description__like OR name__like in the same Term Query?
- Query & Sort Comments by custom comment meta
- How to get my loop to pull posts into three columns
- How to display lastest post date in the homepage?
- Custom $wpdb Query for Custom Post Type by Category
- Limit number of pages in pagination
- Get a user’s most recent post title
- Categories and products in random order
- add_query_arg() XSS Vulnerability
- Count user posts by user ID, Post type and Post status
- Can’t pass table to $wpdb->prepare
- Query set using tax_query with relation ‘OR’ modifies category object?
- $query->query_var[‘post_type’] not set for pages
- is_archive() doesn’t work on public query var archive pages?
- How to extract all ID variables from a query string?