Hi all
I need to sum up some statistics for all observations which have a date of december-2021 or later. The command would look something like:
Sum var if date>=[stata serial number for 1/12/2021]
My question is if there is an easy way of displaying serial numbers for dates in Stata?
I know how to solve the problem doing:
gen dec = date("1/12/2021", "MDY")
tab dec
But I wonder if there would be a less tedious way?
I need to sum up some statistics for all observations which have a date of december-2021 or later. The command would look something like:
Sum var if date>=[stata serial number for 1/12/2021]
My question is if there is an easy way of displaying serial numbers for dates in Stata?
I know how to solve the problem doing:
gen dec = date("1/12/2021", "MDY")
tab dec
But I wonder if there would be a less tedious way?
Comment