If i have a date variable, is there a way of knowing with week number of the month(i.e 1-4) is it?
I am using week() but it can only give the week number of the year(i.e 1-52).
Here is a sample code:
clear all
set obs 1
gen mystr=c(current_date)
gen eventdate = date(mystr, "DMY")
format eventdate %td
gen b = week(eventdate)
I am using week() but it can only give the week number of the year(i.e 1-52).
Here is a sample code:
clear all
set obs 1
gen mystr=c(current_date)
gen eventdate = date(mystr, "DMY")
format eventdate %td
gen b = week(eventdate)
Comment