cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattadams84
New Member

Dynamically update URL with tomorrow date

Hello,

 

In excel i have a power query that fetches data from a web JSON API. What i would like to be able to do is to append the URL of this API so that it is automatically appended to include tomorows date at the end.

 

Here is how i currently call the api:

 

Source = Json.Document(Web.Contents("https://api.football-data-api.com/todays-matches?key=xxxxx")),

 

What i need to do is add, in this format, the date of tomorrows date to the end of the API address.

 

&date=YYYY-MM-DD

 

So the end result would look like this:

 

Source = Json.Document(Web.Contents("https://api.football-data-api.com/todays-matches?key=xxxxx&date=YYYY-MM-DD")),

 

Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
mattadams84
New Member

After some searching, i found my own solution :

Source = Json.Document(Web.Contents("https://api.football-data-api.com/todays-matches?key=xxxxx&date=" & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()), 1), "YYYY-MM-DD"))),

View solution in original post

1 REPLY 1
mattadams84
New Member

After some searching, i found my own solution :

Source = Json.Document(Web.Contents("https://api.football-data-api.com/todays-matches?key=xxxxx&date=" & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()), 1), "YYYY-MM-DD"))),

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,366)