<human>:  Give me a Python function to process a string into a date object.
<bot>: Here is a Python function to process a string into a date object

import datetime

def process_string_to_date(string):
  """Process a string into date object"""
  return datetime.datetime.strptime(string, "%Y-%m-%d")

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

# Calling the function
date = process_string_to_date(string)

# Printing the date
print(date)

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

#Remember to inspect code for bugs.