Forum Discussion
Power Query Start date to today
askspepsi
Your formula is creating a list of dates from [Start Date] with 100 days. IF not 100 days, what exactly is required there?
Today is a Date, you a number. if you need today's date in PQ Date.From(DateTimeZone.LocalNow())
You are correct, my formula is creating for 100days, but for time being and to make the formula work I kept as 100days, but in reality, it should take today's date for example:- one employee starts from May 1st, 2021 then the date master should have 1st May 2021 to 27th May 2021 and when it is tomorrow the date master should be 1st May 2021 to 28 May 2021.
As you said to use Date.From(DateTimeZone.LocalNow()),
My Formula is now working fine, Thank you.
List.Dates([Start Date], Duration.Days(Date.From(DateTimeZone.LocalNow()) -[Start Date])+1 , #duration(1, 0, 0, 0))