You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


weekday

Returns the day number of the week from a day/time string.

Example

Return the day number from July 7, 2014 at midnight.

weekday(timestamp("2014-07-07 00:00:00"))

This example returns 2 for Monday.

Syntax

weekday([date | timestamp] expr t)
  • t: expression evaluating to a timestamp or date

    Returns

    int

Notes

weekday returns an integer associated with the day of the week, with 1 representing Sunday.


© Incorta, Inc. All Rights Reserved.