I want to number/index observations in my Stata dataset by date with the following logic: if the eventdate = observation date --> assign index (or counting number) 0, give n-1 n-2 ... for the previous dates and n+1 , n+2 .... for the following dates.
I checked the help but I couldn't find a convincingly helpful answer.