Okay
  Public Ticket #1356913
datetime
Closed

Comments

  •  2
    Randy started the conversation

    I am using mysql to query the database.  It appears that wpdatatables is not correctly selecting the datetime of the records. I am using placeholders for the datetime variables.

    I have a query that selects records >= '2017-09-14 16:30:00' 

    Two records in the database are '2017-09-14 16:30:00'  

    and '2017-09-14 09:00:00' The database column is defined as datetime. The wpdatatables column type is datetime.

    The wpdatatables selects both records and should only be selecting one record.

    When querying the database directly the query works as expected and only selects one record.

    wpdatatables converts the 24 hour time to AM and PM.  the records displayed in the wpdatatables show as 2017-09-14 09:00 AM and 2017-09-14 04:30 PM, since 09 is higher than 04 this record is also selected ??

  •  471
    Isidora replied

    Hi Randy,
    Thank  you for your purchase.

    Sorry for late response. 

    We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.

    You have option "Time format" in main settings of plugin. You can change in 24h format and you will get data that you need.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  2
    Randy replied

    Changing the Time format did not change the results.  I changed the default placeholder and received the correct result.  As soon as the variable is passed to the placeholder I continue to get both records.

  •  471
    Isidora replied

    Hi Randy,

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.

    Also point me to the table id where you have this issue.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •   Randy replied privately
  •   Isidora replied privately
  •  2
    Randy replied

    Milan,

    Thanks for looking at this.  

    My problem is the way the variables are passed to the shortcode.  As soon as the blank is reached no time is specified in the placeholder and therefore all records with that date are shown because I was not using quotes when passing the variable.

    I've now updated my code to reflect the passing of the variable within quotes.

  •  471
    Isidora replied

    Hi Randy,

    You are welcome.  Glad that we help you.

    If you have any more issues feel free to open a new ticket, we will gladly help.

    We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks! 

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables