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]
- Get the ID of the latest post
- Get all image from single page using this query
- What is the most efficient way of querying posts based on visits and date for current day?
- Add multiple value to a query variable in WordPress
- wp_dropdown_categories with multiple select
- How to tune search argument in WP_Query to show only exactly the same results?
- How to get my loop to pull posts into three columns
- Custom $wpdb Query for Custom Post Type by Category
- Can’t pass table to $wpdb->prepare
- Date query year and month OR just year
- Are database queries created using WordPress filters protected from SQL injection?
- get post id using the $query_vars variable
- Is there a conditional tag for latest post or do i need a query?
- Pull post meta with post_query?
- Huge amount of queries on my site
- WordPress Orderby Numeric Value Not Working
- Using pre_get_posts to target a query in the sidebar
- How do I use get_query_var() within plguin code
- How to display related posts by same publish date?
- Get post according to current taxonomy
- If meta key exists in get posts function otherwise create it
- Page displays content from different query?
- Ordering by a metadata subfield in WordPress?
- Create a new query in function.php to filter blog posts
- Alter query with posts_clauses to retrieve NULL values last
- Query based on title, with ‘compare’ => ‘IN’
- Plugin will sort users by usermeta
- How to get posts and comments amount per hour, per year and per month?
- Number of posts in the archive
- Output meta into arrays
- empty query breaks other queries
- Problem in exploding the_content to array
- What is wrong with my wp query, cant exclude the category that i want
- how to insert missing tags into the posts through mySQL?
- How to write update query in WordPress to expire transients
- Query Nickname rather than Display Name in custom Woocommerce plugin
- Get previous posts list
- how to replace old DW site with new WP site? [closed]
- WordPress SQL query to tag all posts containing a specific word on title
- Order terms by count – missing terms
- Querying Advanced Custom Fields
- How to rearrange a pool of posts joined using two queries?
- wpdb update multiple row?
- Custom query Custom-Post-Types creates error
- Formatting a date/time returned from a custom $wpdb query
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- Rewrite rule for query params
- Hook into the Admin Dashboard and redirect users
- Displaying data from custom table
- SEO friendly query vars
- Prevent versioning for .woff (font) files
- How to get meta key list efficiently?
- Orderby event date (if it exists) or post date (if it doesn’t) – how to reorder posts based on meta value OR date
- OR condition not working
- Query not returning child posts for any parent post ID
- how to get postmeta info based on multiple categories?
- Add Hook for clearing transient when post is added
- How to get several fields from wp_query?
- query by meta value then date and not empty meta value
- Show links to child pages on both parent AND child pages
- Modify Global Posts Plugin
- How to reference same column name but different table in custom db query
- Retrieving custom field array value through db query
- SQL Query : how copy all tags of post into their post content in wordpress by sql query
- Query parsing only author ids
- How to figure out correct wp_options to have autoload=’yes’