datetime icon indicating copy to clipboard operation
datetime copied to clipboard

import datetime.now().date()

Open Garibaldi07 opened this issue 8 months ago • 0 comments

Hey there, i wrote this code, i research on web somethings similar but i cannot find the right code, could you please, help me?

microsoft = yf.Ticker("MSFT")

print ("Company Sector:", microsoft.info['sector']) print("P/E Ratio:", microsoft.info['trailingPE']) print("Company Beta:", microsoft.info['beta'])

microsoft = yf.download("MSFT", '2019-01-01', 'data_corrente', auto_adjust=True) data_corrente = datetime.now().date()

microsoft = microsoft.drop(["Volume"], axis=1) microsoft["Close"].plot() plt.show()

[100%**] 1 of 1 completed

1 Failed download: ['MSFT']: ValueError("time data 'data_corrente' does not match format '%Y-%m-%d'")

Garibaldi07 avatar Jul 31 '25 13:07 Garibaldi07