PyZipline/pyzipline/utils.py
SeaswimmerTheFsh 795ca60894
Some checks failed
Pylint / Pylint (3.12) (push) Failing after 36s
feat(docs): in theory, added auto generating docs for the models
2023-12-19 05:54:49 -05:00

11 lines
331 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
:type date_string: str
:return: Datetime object
:rtype: datetime
"""
return datetime.strptime(date_string, '%Y-%m-%dT%H:%M:%S.%fZ')