Forum Discussion
New Date Column
- Anonymous5 years ago
Table.AddColumn (LastStepName, "Expiration Date", each if [DateColumn] >= Date.AddDays(Date.From(DateTime.LocalNow()), -90) then Date.AddDays(Date.From(DateTime.LocalNow()), +90) else [DateColumn])
--Nate
You need just one parentheses at the end.
Sorry I just realised it is changing the date for all the Expiration dates I just wanted to change the date for next 90 days only so how to write and && conditiion like "Expiration Date", each if [DateColumn] >= Date.AddDays(Date.From(DateTime.LocalNow()), -90) && "Expiration Date", each if [DateColumn] <= Date.AddDays(Date.From(DateTime.LocalNow()), +90) then Date.AddDays(Date.From(DateTime.LocalNow()), +90) else [DateColumn]) then Date.AddDays(Date.From(DateTime.LocalNow()), +90) else [DateColumn])
so that all the dates after 90 days will fall under else condition