Karim,
unless I am mssing something, you just need to convert it into days since
Jan 1 1960, and then use Stata's date functions.
gen daystamp=timestamp/(24*60*60)
- -- daystamp is now days since 1/1/1970.
now compute the n of days between 1/1/1960 and 1/1/1970.
. di date("1/1/1970","mdy")
3653
so
replace daystamp=daystamp+3653
and
format daystamp %d
I believe that what Karim and Liz Allred are asking for is the ability to
have the granularity of time in HH:MM:SS, as is present in the *nix
timestamp. Your solution has a maximal resolution of one day. What if we
need to know whether the patient took the drug at 0802 or 1617 that day?
Given Stata's medical orientation and the use of time-of-day in
experimental data, it surprises me that this omission has not been
addressed.