> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: GetWeek

> Extract the ISO week-of-year number from a datetime expression. Use GETWEEK for weekly reporting and data grouping in ETL pipeline expressions.

## Description

Returns the week of a week year from a datetime expression.

## Syntax

`GetWeek(datetime_expression)`

## Examples

`GetWeek(ToDate('2012-12-31T08:02:31.667Z'))` returns 1

`GetWeek(ToDate('2013-09-10T08:02:31.667Z'))` returns 37

## Notes

Week 1 in a week year is the week with the year's first Thursday.\
For more information, see [https://en.wikipedia.org/wiki/ISO\_week\_date](https://en.wikipedia.org/wiki/ISO_week_date).

## Return value datatype

Integer

## Impact of null value

If input is null, returns null.
