I am trying to get a call record list from our VOIP Provider.
The given details are:
Name In Type Required Description
I tried to fetch it with the following:
= Json.Document(Web.Contents("https://api.placetel.de/v2/call_detail_records", [Headers=[Authorization="xxxx", date= DateTime.Date(DateTime.LocalNow()),today= date,year = Number.ToText(Date.Year(today)),month = Text.PadStart(Number.ToText(Date.Month(today)),2,"0"),day = Text.PadStart(Number.ToText(Date.Day(today)),2,"0"),mydate = year&"-"&month&"-"&day, page="10", per_page="50"]]))
The solution is:
Expression.Error: The value "#date(2020, 3, 20)" cannot be converted to the type "Text".Details:Value=20.03.2020Type=[Type]
Any help for me?
Thanks a lot!
I really, really need help with his, I have a deadline I need to met.
You would be a fantastic help!
For dates, you should use Date.ToText instead of Number.ToText function.
Paul ZhengIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried it, now it says:
Expression.Error: Der Wert "23" kann nicht in den Typ "Date" konvertiert werden.Details:Value=23Type=[Type]
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.