The year function returns the year value of an attribute containing a date.
The date, week, month, quarter or datetime attribute type from which you want retrieve the month value. The date parameter is mandatory.
The following example uses the Instagram_data dataset.
In this example, imagine the Year attribute doesn’t exist, and we want to fill a new attribute with the year value of the Date Posted attribute.
Add a new attribute, called newyear, and type the following formula:
and the attribute will be populated with the year of the datetime attribute Date Posted.
You can double check the results by comparing the column with the existing Year one.