2023-12-19 05:36:18 -05:00
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
def convert_str_to_datetime(date_string: str) -> datetime:
|
|
|
|
"""Converts a string to a datetime object
|
|
|
|
|
|
|
|
:param date_string: String to convert
|
2023-12-19 05:54:49 -05:00
|
|
|
:type date_string: str
|
2023-12-19 05:36:18 -05:00
|
|
|
:return: Datetime object
|
2023-12-19 05:54:49 -05:00
|
|
|
:rtype: datetime
|
2023-12-19 05:36:18 -05:00
|
|
|
"""
|
|
|
|
return datetime.strptime(date_string, '%Y-%m-%dT%H:%M:%S.%fZ')
|