• Resolved Dartmoor Dave

    (@dartmoor-dave)


    In 2014 you helped me create this table and I installed the TablePress Extension: DataTables Sorting plugins to get the dates to format and sort correctly. I recreated the table in 2017 and it worked great. I have now recreated the table in 2018 and not only do the dates format differently, but they are now 4 years and 1 day out. This would appear to be the difference between the 1900 and 1904 date formats in Excel.
    I want the dates to format as DD/MM/YY as they did previously. The table shown is created from a subset of the Excel file I used in 2017, but only contains a few records. The previous 2 versions of the table (displaying correctly) are available from the menu. I copied the same Plugin Options from the previous table into this one, so nothing should be different, and all is OK except the date column.
    Any help would be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The “Placed” column doesn’t have the “DD/MM/YY” format for me. Could you maybe try saving the table to a CSV file in Excel and then import that? That should preserve the original format from the Excel file.

    Regards,
    Tobias

    Thread Starter Dartmoor Dave

    (@dartmoor-dave)

    Hi Tobias,
    Thank you for your reply. It has solved the formatting problem but the field is now considered as a text field and no longer sorts as a date field. I am sure we had this problem in 2014 which is why I installed the TablePress Extension: DataTables Sorting plugins. If you look at either the 2014 or 2017 Dartmoor Geocache tables from the main menu you will see that they both format and sort correctly. I also feel sure that we used the xlsx versions and not the csv versions of the import files.
    Many thanks,
    Dave.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Dave,

    thanks, now we at least have a “non text” date. It would probably be even better if you used the 4-digit year (i.e. the “dd/mm/yyyy” date format), but we can probably already make it work.
    Please add this to the “Custom Commands” textfield on the table’s “Edit” screen:

    "columnDefs": [ { "type": "date-eu", "targets": [ 2 ] } ]
    

    Regards,
    Tobias

    Thread Starter Dartmoor Dave

    (@dartmoor-dave)

    Hi Tobias,
    Once again many thanks for your help and this has certainly worked and has solved the problem. However, I am mystified as to why I didn’t need to add this for my 2014 or 2017 tables which sorted ok after I added the TablePress Extension: DataTables Sorting plugin.

    Another small question for you please. I have increased the padding for the table from 2px to 6px to give more clarity to the columns. However, this has also added space between the rows. I would like the padding between the rows to remain at 2px, but between the columns to be 6px. Is this possible please?
    Many thanks
    Dave.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Dave,

    sometimes, the algorithm has trouble identifying the exact date format, so that it’s necessary to manually set it with that command.

    To only increase the horizontal padding, write the command like this:

    padding: 2px 6px;
    

    Regards,
    Tobias

    Andrea

    (@thomasaspidi)

    Hi dave may i ask u a questions…about your wonderful plugin
    my customer askme if is possible to see in the back end ( when u fill the name and a surname to put in it ) the possibility to see if u have just
    a similar name .
    SO an alert to help u to see that the simila name and surname is just present in the back end
    May u help me to find a solution?
    please
    thanks

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi @thomasaspidi,

    no, sorry, TablePress does not have such a function. Your best chance probably is to use the browser search function.

    Regards,
    Tobias

    P.S.: Next time, please open your own thread here in the forums, thanks!

    Thread Starter Dartmoor Dave

    (@dartmoor-dave)

    Hi Tobias,
    Once again you are spot on and this now works exactly as I would like.
    Many thanks for all your support and I have made a little donation ??
    Regards,
    Dave.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? And thanks for the donation, I really appreciate it!

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Dates formatting differently on a new table’ is closed to new replies.