human
get the date from a string.
assistant
Here is a Python program to get the date from a string

import datetime

def get_date(string):
    """Returns the date from a string."""
    return datetime.datetime.strptime(string, "%Y-%m-%d")

# Enter the string
string = "2019-01-01"

# Calling the function
date = get_date(string)

# Printing the result
print(date)

#Example Output
# 2019-01-01 00:00:00

#Remember to inspect code for bugs.