Related to "date/time"
Flux date package
The Flux date
package provides date and time constants and functions. Import the date
package.
hourSelection() function
The hourSelection()
function retains all rows with time values in a specified hour range. Hours are specified in military time.
timeShift() function
The timeShift()
function adds a fixed duration to time columns.
today() function
The today()
function returns the now()
timestamp truncated to the day unit.
truncateTimeColumn() function
The truncateTimeColumn()
function truncates all input table _time
values to a specified unit.
Work with time types
A time type represents a single point in time with nanosecond precision. Learn how to work with time data types in Flux.
date.hour() function
The date.hour()
function returns the hour of a specified time. Results range from [0-23]
.
date.microsecond() function
The date.microsecond()
function returns the microsecond of a specified time. Results range from [0-999999]
.
date.millisecond() function
The date.millisecond()
function returns the millisecond of a specified time. Results range from [0-999999]
.
date.minute() function
The date.minute()
function returns the minute of a specified time. Results range from [0-59]
.
date.month() function
The date.month()
function returns the month of a specified time. Results range from [1-12]
.
date.monthDay() function
The date.monthDay()
function returns the day of the month for a specified time. Results range from [1-31]
.
date.nanosecond() function
The date.nanosecond()
function returns the nanosecond of a specified time. Results range from [0-999999999]
.
date.quarter() function
The date.quarter()
function returns the quarter of the year for a specified time. Results range from [1-4]
.
date.second() function
The date.second()
function returns the second of a specified time. Results range from [0-59]
.
date.truncate() function
The date.truncate()
function truncates a time to a specified unit.
date.week() function
The date.week()
function returns the ISO week of the year for a specified time. Results range from [1-53]
.
date.weekDay() function
The date.weekDay()
function returns the day of the week for a specified time. Results range from [0-6]
.
date.year() function
The date.year()
function returns the year of a specified time.
date.yearDay() function
The date.yearDay()
function returns the day of the year for a specified time. Results range from [1-365]
for non-leap years, and [1-366]
in leap years.
date.add() function
date.add()
adds a duration to a time value and returns the resulting time.
date.sub() function
date.sub()
subtracts a duration from a time value and returns the resulting time value.
experimental.addDuration() function
The experimental.addDuration()
function adds a duration to a time value and returns the resulting time.
experimental.alignTime() function
The experimental.alignTime()
function aligns input tables to a common start time.
experimental.subDuration() function
The experimental.subDuration()
function subtracts a duration from a time value and returns a the resulting time value.
system.time() function
The system.time()
function returns the current system time.