Forum Discussion

robarivas's avatar
robarivas
Post Patron
9 years ago
Solved

Powery Query #date function

Talking about M (Power Query) language here. How can I parameterize or otherwise make dynamic the 3 arguments in the #date function?   #date(2017, 6, 16)   I have a 1 row, 1 column table with a s...
  • MarcelBeug's avatar
    MarcelBeug
    9 years ago

    You don't need hard coded values: this function works perfectly fine;

     

    Edit: If you are looking for alternatives then please specify exactly what should happen.

    E.g. you can create a series of numbers and then change the type to date.

    Or you can use List.Dates.

     

    E,g, this fuction creates a table with1 column with 10 dates:

    (Year as number, Month as number, Day as number) => Table.FromColumns({List.Dates(#date(Year,Month,Day),10,#duration(1,0,0,0))}, type table[Date as date])