website logo
Navigate through spaces
Carrot reference
⌘K
Carrot reference
Getting started with Carrot
Premade Carrot filters
Operator precedence
Expression truthiness
Carrot fields
Basic Org Information
Compensation
Job Changes
Permissions
Personal
Recruiting
Structure
Time off
Data types
Elements of Carrot expressions
Functions
Operators
Keywords
Aggregators
Docs powered by archbee 
website logo

year()

Returns the Gregorian calendar year of a particular date.

Syntax

year(date)

  • date - the date from which to extrapolate the year
  • Return type: Number

Sample usage

year('2020-05-12') returns 2020.

Supported data types

Input type

Return type

Logic

Date

Number

If a Date is passed, the year corresponding to that date will be returned.

Unsupported data types

Null

Unsupported data types return Null.

Updated 01 Feb 2023
Did this page help you?
Yes
No
UP NEXT
Operators
Docs powered by archbee