_first_of_month

Returns a timestamp with time zone (as a string) by converting the day value in "string_expression" to 1, where "string_expression" is a timestamp with time zone.

Syntax

_first_of_month ( string_expression )

Example 1

# _first_of_month ( '2005-11-11 12:00:00.000-05:00' ) #

Result

2005-11-01 12:00:00.000000000-05:00

Example 2

# timestampMask ( _first_of_month ( '2005-11-11 12:00:00.
000-05:00' ) , 'yyyymmdd' ) #

Result

20051101