Last active
May 22, 2019 10:19
-
-
Save DmitriyVlasov/c38d7c31b72ccd835c7f01ed088bad7b to your computer and use it in GitHub Desktop.
Added Date and Hour Colum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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