Hitachi Vantara Pentaho Community Wiki

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Returns the year of a date, an integer between 1583 and 9956.

Syntax

...

Code Block

YEAR( date )

date
format: month/day/year or  year-month-day

...

Syntax

Result

report: YEAR("6/21/69")

1969

report: YEAR("1969-6-21")

1969

BDate = "6/21/69"
 
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="657626337ba10c6d-27bcc4e2-4070437b-ba879d9a-41e3c646ad5838199628a811"><ac:plain-text-body><![CDATA[report: YEAR([BDate])

1969

]]></ac:plain-text-body></ac:structured-macro>