View Single Post
Old 09-19-2023, 11:31 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,389
Karma: 79699999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by Rellwood View Post
Should I create a text column to hold the import date perfectly as it is, then create a date column with dd MMM yyyy and do some formatting of the date to copy it over? How will I retain wrong dates? LT has no problem showing dates that are wildly incorrect and impossible, so it won't be possible to copy those over, but being able to spot them will be difficult. I want to compare the column side by side with the correct dates in Calibre.
If you import into a text column, you can then use a template to convert it to a a date that can be inserted into a date column using Action Chains' single-field edit or Search&Replace.

As a simple example:

Code:
program:

somedate = 'Sep 19 2023';
## somedate = '23/09/2023';

	format_date(somedate, 'yyyy-MM-dd')
If the date doesn't exist (e.g. September 32), the template returns BAD DATE.

Last edited by ownedbycats; 09-19-2023 at 11:46 PM.
ownedbycats is offline   Reply With Quote