Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2011, 07:31 AM   #16
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by enriquep View Post
There ain't no such thing as a free lunch.
Today only, just for you, for the small fee of €0, you get lunch.

I just added the ability to put the hours, minutes, and seconds into the string. The change should appear in the next release. The change applies to everywhere date format strings are used, not just in the formats_modtimes function.

My guess is you will want a 24-hour clock with hours & minutes. Something like this should work for you (after the next release).
Code:
{:'re(list_item(formats_modtimes('dd/MM/yy hh:mm'), 0, ','), '^.*?:', '')'}
The full list of codes is below the spoiler:
Spoiler:
Code:
        d    : the day as number without a leading zero (1 to 31)
        dd   : the day as number with a leading zero (01 to 31) 
        ddd  : the abbreviated localized day name (e.g. "Mon" to "Sun"). 
        dddd : the long localized day name (e.g. "Monday" to "Sunday"). 
        M    : the month as number without a leading zero (1 to 12). 
        MM   : the month as number with a leading zero (01 to 12) 
        MMM  : the abbreviated localized month name (e.g. "Jan" to "Dec"). 
        MMMM : the long localized month name (e.g. "January" to "December"). 
        yy   : the year as two digit number (00 to 99). 
        yyyy : the year as four digit number.
        h    : the hours without a leading 0 (0 to 11 or 0 to 23, depending on am/pm)
        hh   : the minutes with a leading 0 (00 to 11 or 00 to 23, depending on am/pm)
        m    : the minutes without a leading 0 (0 to 59)
        mm   : the minutes with a leading 0 (00 to 59)
        s    : the seconds without a leading 0 (0 to 59)
        ss   : the seconds with a leading 0 (00 to 59)
        ap   : use a 12-hour clock instead of a 24-hour clock, with 'ap' replaced by the localized string for am or pm.
        AP   : use a 12-hour clock instead of a 24-hour clock, with 'AP' replaced by the localized string for AM or PM.
        iso  : the date with time and timezone. Must be the only format present.
chaley is offline   Reply With Quote
Old 11-03-2011, 10:46 AM   #17
enriquep
Connoisseur
enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.enriquep shines like a glazed doughnut.
 
enriquep's Avatar
 
Posts: 52
Karma: 8860
Join Date: Jul 2009
Location: Madrid, Spain, EU
Device: Sony PRS-505, Sony PRS-T1, Sony PRS-T3
Quote:
Originally Posted by chaley View Post
Today only, just for you, for the small fee of €0, you get lunch.

I just added the ability to put the hours, minutes, and seconds into the string. The change should appear in the next release. The change applies to everywhere date format strings are used, not just in the formats_modtimes function.
Well...

What can I say apart from THANK YOU?? - Gracias, probably!!

EDIT: The code works perfectly as you posted it (new Calibre version)


Last edited by enriquep; 11-06-2011 at 04:25 AM. Reason: Code tested
enriquep is offline   Reply With Quote
Advert
Reply

Tags
custom column, dates, file versions


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Date Added" custom column? cheechwhiz Library Management 1 08-20-2011 10:25 AM
Can't clear "custom" date field? joegearhart Calibre 5 12-20-2010 03:32 AM
Adding a "read" column French Calibre 3 08-21-2010 12:29 PM


All times are GMT -4. The time now is 04:20 PM.


MobileRead.com is a privately owned, operated and funded community.