docs-v2/content/v2.0/reference/flux/stdlib/date/weekday.md

593 B

title description aliases menu weight
date.weekDay() function The `date.weekDay()` function returns the day of the week for a specified time. Results range from `[0-6]`.
/v2.0/reference/flux/functions/date/weekday/
v2_0_ref
name parent
date.weekDay Date
301

The date.weekDay() function returns the day of the week for a specified time. Results range from [0-6].

Function type: Transformation

import "date"

date.weekDay(t: 2019-07-17T12:05:21.012Z)

// Returns 3

Parameters

t

The time to operate on.

Data type: Time