Hi,
I was wondering if anyone could possibly help me with constructing a couple of week indicators.
I have 2 date variables: date1 and date2. I would like to use date1 to construct a weekno1 which would tell me the week number of the year. The catch is that weekno1 should count from Sunday through Saturday.
Then, I want to look at compare date1 and date2, and assign a new weekno2 a value of whatever the week number (weekno1) that date2 falls into. How do I do this?
My time frame is 2 months in the middle of the year, so I wouldn't have to deal with dates over years.
Thank you very much!
Xuyang
I was wondering if anyone could possibly help me with constructing a couple of week indicators.
I have 2 date variables: date1 and date2. I would like to use date1 to construct a weekno1 which would tell me the week number of the year. The catch is that weekno1 should count from Sunday through Saturday.
Then, I want to look at compare date1 and date2, and assign a new weekno2 a value of whatever the week number (weekno1) that date2 falls into. How do I do this?
My time frame is 2 months in the middle of the year, so I wouldn't have to deal with dates over years.
Thank you very much!
Xuyang
Comment