def date_format(d):
    """Takes numerical date without formatting (20141225) and formats it (2014.12.25)
    """
    if not d:
        return ""
    t = str(d)
    return "{}.{}.{}".format(t[0:4], t[4:6], t[6:8])