def appendable_datetime(dt, millis=False):
    """Datetime in a format that can be easily appended to strings, with no punctuation.

    Useful for imposing semi-uniqueness on a string.
    """
    return dt.strftime('%Y%m%d%H%M%S{}'.format('%f' if millis else ''))
