diff --git a/openbb_terminal/cryptocurrency/nft/opensea_model.py b/openbb_terminal/cryptocurrency/nft/opensea_model.py index 58dc023519c..550611c1f70 100644 --- a/openbb_terminal/cryptocurrency/nft/opensea_model.py +++ b/openbb_terminal/cryptocurrency/nft/opensea_model.py @@ -52,6 +52,9 @@ def get_collection_stats(slug: str) -> pd.DataFrame: "Creation Date", "URL", ] + # T his variable is here because sometimes the created dates also have + # milliseconds in the string and we dont it, so this just gets the m,d,y,h,m,s + created_date = collection["created_date"][0:19] values = [ collection["name"], "-" if not stats["floor_price"] else float(stats["floor_price"]), @@ -69,9 +72,7 @@ def get_collection_stats(slug: str) -> pd.DataFrame: round(float(stats["total_supply"]), 2), round(float(stats["total_sales"]), 2), round(float(stats["total_volume"]), 2), - datetime.strptime( - collection["created_date"], "%Y-%m-%dT%H:%M:%S.%f" - ).strftime("%b %d, %Y"), + datetime.strptime(created_date, "%Y-%m-%dT%H:%M:%S").strftime("%b %d, %Y"), "-" if not collection["external_url"] else collection["external_url"], ] df = pd.DataFrame({"Metric": metrics, "Value": values})