Hi. The data below spans 1 Jan, 2022 - 31 July, 2024. From the date variable below, I would like to generate a continuous/sequential week variable that groups together seven days (including the dates missing in between). I tried using the week function. However, I don't want the week variable to reset to 1 at 1 Jan, 2023, i.e. 1-7 Jan, 2023 would be week 53.
Any help in doing this would be much appreciated.
Any help in doing this would be much appreciated.
Code:
clear input float appt_date 22646 22648 23559 22984 23468 22802 22678 23412 23437 23563 22828 23558 22707 23225 22833 23225 23229 22797 23226 22652 22802 22770 22986 22769 23561 22952 23047 22890 23321 22711 23500 23499 23562 22711 22648 22706 22830 23134 23470 22708 22798 23045 22737 23503 23289 22860 22742 23533 23104 22709 22827 22768 22681 23563
Comment