def date_to_str(date):
 return (datetime.strftime(date, config.DATE_FORMAT) if date else None)

def date_to_str ( date ) : return ( datetime . strftime ( date , config . DATE_FORMAT ) if date else None )
converts a datetime value to the format defined in the configuration file .