def _get_date_and_time_strings(date):
    """Return string of YYYYMMDD and time in HHMM format for file access."""
    y, m, d, h = [str(i) for i in [date.year, date.month, date.day, date.hour]]

    # add zeros if needed
    if len(m) == 1:
        m = '0' + m
    if len(d) == 1:
        d = '0' + d
    if len(h) == 1:
        h = '0' + h
    if len(h) == 2:
        h += '00'

    return y+m+d, h