View Single Post
Old 10-13-2020, 07:39 PM   #888
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: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
For a format_date, how would I make it return the first three numbers of the year?

Code:
{pubdate:'test($,
strcat(format_date($,'yyyy')),
'Unknown')'}
I'm trying to get this to return, for instance, 1970.1973 if the pubdate year is 1973.
See https://www.mobileread.com/forums/sh...29#post4046729.

It seems that adding substr to the template functions might be a good idea.
chaley is offline   Reply With Quote