• Resolved intro.pl

    (@intropl)


    Hello,

    at the beginning I would like to thank you for the remarkable work you have done…

    But I am wondering if there is any possibility to change a date listing format in one of the columns? In my database, in the particular column there is a YYYY-MM-DD format set. Nevertheless, db-table-editor keeps listing the results in MM/DD/YYYY format. What is more it changes all the dates like 0000-00-00 into 11/30/1, strange….

    Best regards,
    Matt.

    https://www.ads-software.com/plugins/wp-db-table-editor/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author bobbysmith007

    (@bobbysmith007)

    Dates are highly non-trivial and I would gladly accept patches improving them.

    To simply treat them as strings and use iso-format(yyyy-mm-dd), I believe you can just set the auto_date parameter on the add_db_table_editor call to false. I have waffled on what the default of this should be or how to otherwise improve this, but in my locality and with my customer base there seems to be a strong preference for mm/dd/yyyy and so that was what the default was set to originally.

    Thread Starter intro.pl

    (@intropl)

    Ok, thank you for your respone.
    I will try aforementioned solution as soon as possible.

    Thread Starter intro.pl

    (@intropl)

    Nope, it still forces wrong (according to me) date format ;/

    Plugin Author bobbysmith007

    (@bobbysmith007)

    Can I see your add_db_table_editor call, so that I can test it locally please? Setting auto_date to false worked for me:

    add_db_table_editor(array(
        'title'=>'DBTE Test',
        'table'=>'dbte_test',
        'sql'=>$sql,
        'auto_date'=>false
      ));
    Thread Starter intro.pl

    (@intropl)

    Oh thank you. Anyway I fixed that in a different way by changing DBTableEditor.class.php –

    if(!isset($args[‘auto_date’])) $this->auto_date=false;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dateformat changing’ is closed to new replies.