Hi,
I want to create a week variable according to the weeks in the year 1 through 52. Our dataset is offline, and we cannot install any packages as dataex.
Our data runs over two years, and we want to group observations in weeks and then compare the differences between the weeks. Currently we have made two date variables, "DMY hms" and "DMY". We now want a variable with "YW" or something similar. The point is to get calendar weeks in our data.
Additionally, we want the weeks to start on a specific date (5th of January 2015), and not the first day of the year.
Appreciate some input on this, thanks!
I want to create a week variable according to the weeks in the year 1 through 52. Our dataset is offline, and we cannot install any packages as dataex.
Our data runs over two years, and we want to group observations in weeks and then compare the differences between the weeks. Currently we have made two date variables, "DMY hms" and "DMY". We now want a variable with "YW" or something similar. The point is to get calendar weeks in our data.
Additionally, we want the weeks to start on a specific date (5th of January 2015), and not the first day of the year.
Appreciate some input on this, thanks!
Comment