Search code examples
dateyahoo-finance

How are dates formatted on Yahoo Finance?


I'm making a Python program to get stock data from Yahoo Finance. I want it to be able to get data from multiple stocks at multiple dates. The URL is like this: https://finance.yahoo.com/q/op?s=GOOG&date=1423785600, and I know how to change the stock sign, but how are the dates formatted? Is there a way to compute this or should I just brute-force it and look through all the options on the drop-down Dates menu?


Solution

  • That would be formatted as the total number of seconds since January 1st, 1970 00:00:00.000 UTC (the Unix Timestamp).