--- title: date.weekDay() function description: > The `date.weekDay()` function returns the day of the week for a specified time. Results range from `[0-6]`. aliases: - /v2.0/reference/flux/functions/date/weekday/ menu: v2_0_ref: name: date.weekDay parent: Date weight: 301 --- The `date.weekDay()` function returns the day of the week for a specified time. Results range from `[0-6]`. _**Function type:** Transformation_ ```js import "date" date.weekDay(t: 2019-07-17T12:05:21.012Z) // Returns 3 ``` ## Parameters ### t The time to operate on. _**Data type:** Time_