I would like to extract the week in the year from a large dataset. I selected 'Add column based on this column' and used this script ' value.toDate("yyyy/mm/dd").datePart("weeks") '
However the result is week in the month but not year.
More about this issue here. Until it is solved, could you switch to Python/Jython and use this script?
from datetime import datetime
date_time_obj = datetime.strptime(value, '%Y/%m/%d')
return date_time_obj.isocalendar()[1]