View Single Post
Old 03-01-2014, 10:40 PM   #21
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Try this:

PHP Code:
program:

    
pdate=finish_formatting(
        
format_date(
            
field('pubdate'),
            
'yyyy'),
        
'',
        
'(',
        
') '
    
);

    
strcat(
        
template("{author_sort}/{title}/{author_sort} - {series:|[|}"),' ',
        
ifempty(
            
finish_formatting(
                
field("series_index"),
                
'0>3',
                
'',
                
'] '
            
),
            
contains(
                
pdate,
                
'101',
                
'',
                
pdate
            
)
        ),
        
field('title')

It should test if pdate contains "101" and return empty if so.

@theducks why is 1/1/101 the unassigned datetype? Do you have any idea why I have the empty string for an unassigned date? I am using linux if it makes a difference.

Last edited by eschwartz; 03-01-2014 at 10:45 PM.
eschwartz is offline   Reply With Quote