Forum Discussion
Anonymous
5 years agoNot applicable
How get the Dynamically date range in API link?
Hi, I have this code that imports all currency rates. let
Source = Json.Document (Web.Contents("https://api.exchangerate.host/timeseries?start_date=2021-01-01&end_date=2021-01-20&base=USD&s...
- 5 years ago
Oh, sorry, wrong function... should be DateTime.ToText, not DateTime.Format
artemus
5 years agoMicrosoft Employee
Inside your url:
"https://api.exchangerate.host/timeseries?start_date=2021-01-01&end_date=2021-01-20&base..."Insert the dynamic date
"https://api.exchangerate.host/timeseries?start_date=2021-01-01&end_date=" & DateTime.Format(DateTime.LocalNow(), "yyyy-MM-dd") & "&base..."