Changing Date in web query

Copper Contributor

How can I automatically change the date or enter a date in a cell to change where the web query gets the data table from? I also have a question on how you can do a date range? The dates are at the end of the url, and the ones with a range have the dates inside the url as well.

Some of the queries I want are for 14 days, 30 days, etc. 

Here are a couple examples. 

It seems some of the 14 day ones use actual dates and some may be based on the current date (9/26/17) in this example. 

Thanks in advance if you can help!

https://www.fangraphs.com/leaders.aspx?pos=all&stats=pit&lg=all&qual=0&type=8&season=2017&month=0&se...

https://www.fangraphs.com/leaders.aspx?pos=all&stats=pit&lg=all&qual=0&type=8&season=2017&month=3&se...

https://www.fangraphs.com/leaderssplits.aspx?splitArr=1&strgroup=season&statgroup=2&startDate=2018-2...

 

Thanks in advance!

2 Replies

That doesn't work the way I want...I think I need to use power query