Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I've been trying to pass a parameter in a json url to have the FromDate back to 04 months, for example, but it keeps bringing the whole year.
initialDate="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)))
It results in the correct date, but I guess there is something wrong with the format it's brought in: 29/07/2019, while the original, static date was yyyy-MM-dd.
Any help will be appreciated.
Cheers,
Antonio
Solved! Go to Solution.
...it really turned out to be a formatting issue. The date had then to be like the following:
dataInicial="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)), "yyyy-MM-dd")&...
...thanks to @beginner coder on stackoverflow.
Cheers,
Antonio
...it really turned out to be a formatting issue. The date had then to be like the following:
dataInicial="&Date.ToText(DateTime.Date(Date.AddMonths(DateTime.LocalNow(), -MonthParameter)), "yyyy-MM-dd")&...
...thanks to @beginner coder on stackoverflow.
Cheers,
Antonio
Hi @Asantos2020 ,
Glad to hear that you have resolved your problem. Would you please kindly mark your sharing solution as an answer so that it can benefit more users?
Please do not hesitate to ask here if you have any further question.
Best regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
79 | |
73 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |