Hey there, Awesome Customers!

Just a heads up: Our team will be out of the office on Monday, November 11th in observance of Armistice Day, but don’t worry—we'll be back in full swing on Tuesday, November 12th.

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.

Thanks a bunch for your understanding and support!

Warm regards,

TMS

Okay
  Public Ticket #1119573
colunm type format
Closed

Comments

  •  2
    xadoom86 started the conversation

    Hi,

    i need to format the type TIME for colunms to show seconds.

    f.e. now we can display the time only like "13:35". I need to display "13:35:02".

    how can I do it?

  •  1,818
    Miloš replied

    Hi xadoom86,
    Thank you for your purchase.

    Unfortunately we do not have that feature in our plugin build-in.
    But I can suggest you some workaround.

    Only case (for now) where Time with seconds  would work is to have MySQL table with data. Times will be displayed with seconds and sorting will work but editing from WP backed is not possible. You will have to edit this time values directly in database.

    Steps you need to follow to achieve this:

    Have to go in database, find table wp_options. In this table find wdtTimeFormat in option_name column and set h:i:s as option_value for this column.

    After that you have to create new MySQL table where you will place data. This table will be called "time_table" in this example, and one of the column (or more then one it depends how much time columns do you need) will be TIME type:

    Then when you created a table in database, you'll have to create wpDataTable based on time_table from database, and you can create it if you choose Add From Data Sourceand select MySQL table. Your query should be:

    SELECT * FROM time_table

    Like that you'll show time with second and will be able to sort it, but only way to edit data is directly from the database. Column type for this column should be Time in optional column setup.

    Hope this can help.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables