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


year

Returns the year field from a date value.

Example

year(timestamp("2001-12-24 23:55:12.000"))

The result is 2001

Syntax

year(timestamp expr t)

Parameters

  • t: expression evaluating to timestamp

Returns

int

Notes

year returns the value of the year field from a timestamp or string value. If the argument is a string, the format should be “yyyy-MM-dd HH:mm:ss”.


© Incorta, Inc. All Rights Reserved.