Forum Discussion
Anonymous
3 years agoNot applicable
Defining today's date on advanced editor
Hey guys, I'm pulling data out of a POST API, and one of the requested headers is the date period that will be retrieved. Here's what I've got so far: let
url = "https://my.url.co...
Anonymous
3 years agoNot applicable
Thanks for your reply, amitchandak.
Any thoughts on why this happened?
let
url = "https://my.url.com/Report/SomeReport",
hoje = Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd"),
body = "{""DtInicio"": ""2022-10-01"",""DtFim"": "& hoje &"}",
Source = Json.Document(Web.Contents(
url,
[Headers = [#"Content-Type"="application/json", #"Authorization"="XXXX-8784-XXXXX-8799-XXXXXXXXXXX"],
Content = Text.ToBinary(body)]
)
),
result = Source[result]
in
#"Renamed Columns"amitchandak
Super User
3 years agoAnonymous , it is checking for numbers
may be like
Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyyMMdd")