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.
Jimmy801
5 years agoCommunity Champion
Hello Anonymous
here some example how you can format a date to yy-mm-dd
= Date.ToText(Date.From(DateTime.FixedLocalNow()),"yy-MM-dd")
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy