Answers for "unction that takes as input a list of these datetime strings and returns only the date in 'yyyy-mm-dd' format."

0

unction that takes as input a list of these datetime strings and returns only the date in 'yyyy-mm-dd' format.

def date_parser(dates):
    """

    This function takes as input a list of these datetime strings and returns only the date in 'yyyy-mm-dd' format.

    Parameters:
    -----------
    items: (list), list of datetime strings.

    Returns:
    --------
    returns a list of strings where each element in the returned list contains only the date in the 'yyyy-mm-dd' format.

    """
    my_list = []

    for date in dates:
        my_list.append(date)

        my_list[:10]

    return my_list
Posted by: Guest on October-26-2021

Code answers related to "unction that takes as input a list of these datetime strings and returns only the date in 'yyyy-mm-dd' format."

Python Answers by Framework

Browse Popular Code Answers by Language