10 lines
283 B
Python
10 lines
283 B
Python
|
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
|
||
|
:return: Datetime object
|
||
|
"""
|
||
|
return datetime.strptime(date_string, '%Y-%m-%dT%H:%M:%S.%fZ')
|