Okay
  Public Ticket #1487783
Date Format issue
Closed

Comments

  • Alex started the conversation

    I am connected to a mysql database and I am getting a date from the datatbase in the format mm-dd-yy, I have the same format set in the wpdatatables mm-dd-yy but in the table it is displayed as dd-yy-mm.  I have included screen shots of the setting, the data from mysql and the data table.  Please help me solve this issue. 

    Being able to filter by the date is critical for my application.

    Thank you

  •  471
    Isidora replied

    Hi ahinerfeld,
    Thank you for your purchase.

    Can you please tell me is this column in database set to date type or is varchar? If is date type do you use some function to convert mysql date format(2001-01-01) to this one that you provide in attachment?

    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

  • Alex replied

    Milan,

    Due to the way the form populates the database the column is set for long text.  I am having to do some sql work to convert the data into a usable format that wpdatatables con work with.  The actual date is saved in a column that inclues all of the various form input values and not just a date.

    Here is the actual query that I had to write (with a lot of help) in order to convert the colum to a usable table.

    SELECT * FROM (
    SELECT entry_id,
    GROUP_CONCAT(IF(field_id=’fld_5076430′, value,”) SEPARATOR ”) AS user,
    GROUP_CONCAT(IF(field_id=’fld_8768091′, value,”) SEPARATOR ”) AS first,
    GROUP_CONCAT(IF(field_id=’fld_9970286′, value,”) SEPARATOR ”) AS last,
    GROUP_CONCAT(IF(field_id=’fld_6009157′, value,”) SEPARATOR ”) AS date,
    GROUP_CONCAT(IF(field_id=’fld_5105414′, value,”) SEPARATOR ”) AS event,
    GROUP_CONCAT(IF(field_id=’fld_7723931′, value,”) SEPARATOR ”) AS unit,
    GROUP_CONCAT(IF(field_id=’fld_1521970′, value,”) SEPARATOR ”) AS work,
    GROUP_CONCAT(IF(field_id=’fld_4590434′, value,”) SEPARATOR ”) AS hours
    FROM kcdte_cf_form_entry_values
    GROUP BY entry_id) AS rows
    WHERE hours >'" AND last> ”;

    Any ideas or recommendations would be greatly appreciated.


  •  471
    Isidora replied

    Hi ahinerfeld,

    Sorry for late response. 

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

    Please provide me a temporary WP-admin login and PHPMYADMIN credentialsfor 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.

    Please point me to the name of the database that you use in case that there is more then one.


    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

  •   Alex replied privately
  •   Alex replied privately
  •   Alex replied privately
  •   Alex replied privately
  •   Isidora replied privately