Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Added Date and Hour Colum
let
Source =
Table.FromRecords(
{
[ moment = DateTime.LocalNow() ]
}
),
AddYearColumn = Table.AddColumn( Source, "year", each Date.Year( [moment] ), Int32.Type ),
AddMontholumn = Table.AddColumn( AddYearColumn, "month", each Date.Month( [moment] ), Int32.Type ),
AddDayColumn = Table.AddColumn( AddMontholumn, "day", each Date.Day( [moment] ), Int32.Type ),
AddHourColumn = Table.AddColumn( AddDayColumn, "hour", each Time.Hour( [moment ] ), Int32.Type ),
AddMinuteColumn = Table.AddColumn( AddHourColumn, "minute", each Number.IntegerDivide( Time.Minute( [moment ] ), 15 ) * 15, Int32.Type )
in
AddMinuteColumn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.