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


weeknum

Returns the week number from its timestamp argument.

Example

weeknum(timestamp("2014-01-01 00:00:00"))

This example returns 1.

Syntax

weeknum(timestamp expr t)
  • t : an expression evaluating to a timestamp

Returns

int

Description

Function weeknum takes in a date expression in the format “yyyy-MM-dd HH:mm:ss” and returns the week number in the year of that date or timestamp.


© Incorta, Inc. All Rights Reserved.