I am trying to convert from unix/epoch time to stata time.
My timestamp data is like below.
Best regards,
My timestamp data is like below.
Type: Numeric (double)I tried the following command, but the result remains unreadable.
Range: [1.697e+12, 1.697e+12] Units: 1000
Mean: 1.7e+12
Std. dev.: 2.0e+07
Percentiles: 10% 25% 50% 75% 90%
1.7e+12 1.7e+12 1.7e+12 1.7e+12 1.7e+12
gen double statatime=timestamp*1000+mdyhms(1,1,1970,0,0,0)
format %tc statatime
result:
Type: Numeric (double)I would really appreciate it if someone could tell me how to convert unix/epoch data.
Range: [1.697e+15,1.697e+15] Units: 100000
Best regards,
Comment