Forum Discussion
Anonymous
5 years agoNot applicable
Change date format in query
For a automated reppord i want to change the date in my url to the first day of the previouse month and the last day of the previuouse month. I got it to work with this querry but the url is still no...
- 5 years ago
Hi, Anonymous
You may modify your query as below to see if it helps.
let start = Date.ToText( Date.EndOfMonth(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1 )),"yyyy-mm-dd" ), end = Date.ToText( Date.StartOfMonth(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1 )),"yyyy-mm-dd"), ... in ...Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hello, thanks for helping me with the date time issue, it worekd as intended when changing mm to MM. However, i now get the following error in the querry:
This has probably something to do with the date variables but i have no idea why it is not working