year=2005, month=11, day=16 => '2005-11-16 00:00:00

def get_datetext(year, month, day):
    """year=2005, month=11, day=16 => '2005-11-16 00:00:00'"""
    input_format = "%Y-%m-%d"
    try:
        datestruct = time.strptime("%i-%i-%i" % (year, month, day),
                                   input_format)
        return strftime(datetext_format, datestruct)
    except:
        return datetext_default