Title: Date range filter for data &#8211; CFDB
Last modified: March 4, 2017

---

# Date range filter for data – CFDB

 *  [emir94](https://wordpress.org/support/users/emir94/)
 * (@emir94)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/date-range-for-data/)
 * Hi Michael,
 * Before asking for any support I wanted to thank you for your efforts you put 
   in creating this plugin. It’s by far the most useful plugin I came across so 
   far!
 * If you get a chance, could you please help me get a date range filter working?
   What I’m trying to do is grab values entered from two input fields: Start Date
   and End Date and then insert them into submit_time filter. This is what I have
   so far, but it’s not grabbing the values the same it does for other columns:
 *     ```
       Start Date: <input name="start" type="text"/>
       End Date: <input name="end" type="text"/>
   
       [cfdb-datatable form="Schedule Tracker" filter="submit_time>~~/.*$_POST(start).*/i&&submit_time<~~/.*$_POST(end).*/i"]
       ```
   
 * I really appreciate if you could help me with this.
 * Thanks,
    Emir
    -  This topic was modified 9 years, 2 months ago by [emir94](https://wordpress.org/support/users/emir94/).
      Reason: change of title

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/date-range-for-data/#post-8876012)
 * See if this works:
 * `[cfdb-datatable form="Schedule Tracker" filter="submit_time>=$_POST(start)&&
   submit_time<=$_POST(end)"]`
 *  Thread Starter [emir94](https://wordpress.org/support/users/emir94/)
 * (@emir94)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/date-range-for-data/#post-8878566)
 * That worked perfectly. Thank you so much! It works with `type="date"`, which 
   is even better (in case somebody’s wondering how to implement a date picker range)
 * Thanks Michael,
    Emir
 *  [williampck](https://wordpress.org/support/users/williampck/)
 * (@williampck)
 * [9 years ago](https://wordpress.org/support/topic/date-range-for-data/#post-9107019)
 * Hi Michael. I tried the shortcode you have given and the entire shortcode just
   show up when i do a page preview. It does not show the result of the filter after
   i input in the start and end inputs.
 * I have been trying to do a date search form base on 2 users inputs (Start and
   End), hopefully you could help.
 * Many thanks.
 * William
 * Below is my code
 * <form action=”” method=”POST”>
    Start Date: <input name=”start” type=”text”/>
   End Date: <input name=”end” type=”text”/> <input type=”submit” /> </form>
 * [cfdb-datatable form=”Add-Asset-desktop-Form” filter=”submit_time>=$_POST(start)&&
   submit_time<=$_POST(end)”]
    -  This reply was modified 9 years ago by [williampck](https://wordpress.org/support/users/williampck/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Date range filter for data – CFDB’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [williampck](https://wordpress.org/support/users/williampck/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/date-range-for-data/#post-9107019)
 * Status: not resolved