Forum Discussion
Query Editor date filtering
- 9 years ago
Hi smithmc3,
Please refer to the steps below.
- Select any date when filter data and click OK button.
- Change the date #datetime(2017, 3, 16, 0, 0, 0) to Date.AddDays(DateTime.LocalNow(),-730))
Regards,
Charlie Liao
Hi smithmc3,
Please refer to the steps below.
- Select any date when filter data and click OK button.
- Change the date #datetime(2017, 3, 16, 0, 0, 0) to Date.AddDays(DateTime.LocalNow(),-730))
Regards,
Charlie Liao
- smithmc39 years ago
Advocate I
So I made the change {= Table.SelectRows(#"Changed Type", each [Transcript Completion Date] <= Date.AddDays(DateTime.LocalNow(), -730))}
Then I noticed it was only showing 52 rows instead of 999+. Looked at some of the dates and it was only showing those more than two years old ... changed "<=" to ">=" and we where back in business. Thanks for the help!
- hxkresl9 years ago
Advocate III
v-caliao-msft Followed this post and implemented solution but getting error "we cannot apply < operator to types date and datetimezone". Which type do I need to use?
First make filter, choose any date
Next open query editor and find code for filter
Next I replace with your code snippet
I get this error