The week function returns the week integer value of an attribute containing a value which can reconduct to a date.
The date, week, month, quarter or datetime attribute type if the extract parameter is False to retrieve the month value.
If the extract parameter is True, all attribute types can be used. The date parameter is mandatory.
A binary value (True/False) which is set as False as default.
The following example uses the Instagram_data dataset.
In this example, we want to retrieve the week of the year where the pictures were posted.
We add a new attribute, called week, and type the following formula:
and the attribute will be filled with the corresponding week in integer value.