Forum Discussion
Anonymous
5 years agoNot applicable
Is it possible to store DateTime.LocalNow() as a scalar variable without creating new column?
Hi there, this problem has had me stuck for a little while. All I'm trying to do is filter the table so that it keeps rows with a date greater than 7 days old. To do so, I'm simply using the [D...
- 5 years ago
Something like this (with your own fields):
= Table.SelectRows(#"previous Step", each Duration.Days( Date.From(DateTime.LocalNow()) - [Date] ) > 7)
HotChilli
5 years agoCommunity Champion
You can declare a variable if you want to:
let thedate = Date.From(DateTime.LocalNow()) in
- Anonymous5 years agoNot applicable
Alright so the variable 'thedate' needs to be in it's own let-in environment, seperate (or nested) from the main let-in environment of the query?