Hello all,
I have a series of variables in excel that track how much time has elapsed. For example, 'Avg Talk Time' is the average amount of time spent on the phone, 'Total After Call Time' is the total amount of time spent on the phone after hours, and 'Total Aux/Other' is the total amount of time spent on the phone for other reasons. Ideally, I would like what is displayed in excel (in the table below) to be displayed in Stata after I import it. And I would like to be able to compute the totals of columns in Stata as I have done in Excel. How can I do this?
For example, it displays 56:50:54 in the cell, but the actual value of the cell is 1/2/1900 8:50:54 AM and this is what is displayed in Stata. How can I get Stata to display what is displayed in Excel?
Display in excel:
Display in Stata after importation.
I have tried to import the data as a string, but it will take the value of the cell rather than the display of the cell.
I have tried the conversion from 1900s Excel time to Stata time, but after I do the formatting step, it still displays the time as this -1.63577e+20.
https://blog.stata.com/2011/01/05/us...ther-software/
I tried creating a baseline time variable of Excel in Stata as 31dec1899 00:00:00 and using that to subtract my time variables against, but when I try to create that time variable in Stata, I can only go back to 31dec1959 23:59:38.
*Note: I am using Stata 15
Thank you for your help,
Amelia
I have a series of variables in excel that track how much time has elapsed. For example, 'Avg Talk Time' is the average amount of time spent on the phone, 'Total After Call Time' is the total amount of time spent on the phone after hours, and 'Total Aux/Other' is the total amount of time spent on the phone for other reasons. Ideally, I would like what is displayed in excel (in the table below) to be displayed in Stata after I import it. And I would like to be able to compute the totals of columns in Stata as I have done in Excel. How can I do this?
For example, it displays 56:50:54 in the cell, but the actual value of the cell is 1/2/1900 8:50:54 AM and this is what is displayed in Stata. How can I get Stata to display what is displayed in Excel?
Display in excel:
Avg Talk Time | Total After Call Time | Total Aux/Other |
3:55 | 51:36:16 | 56:50:54 |
0:00 | 0:00 | 0:00 |
6:49 | 66:11:27 | 100:34:30 |
0:00 | 0:00 | 0:00 |
2:08 | 26:43:25 | 57:10:38 |
0:00 | 0:00 | 0:00 |
0:00 | 0:00 | 0:00 |
Total: | 12:52 | 144:31:08 | 214:36:02 |
Display in Stata after importation.
AvgTalkTime | TotalAfterCallTime | TotalAuxOther |
31dec1899 00:03:55 | 02Jan1900 3:36 | 02Jan1900 8:50 |
31dec1899 00:00:00 | 31dec1899 00:00:00 | 31dec1899 00:00:00 |
31dec1899 00:06:49 | 02Jan1900 18:11 | 04Jan1900 4:34 |
31dec1899 00:00:00 | 31dec1899 00:00:00 | 31dec1899 00:00:00 |
31dec1899 00:02:08 | 01Jan1900 2:43 | 02Jan1900 9:10 |
31dec1899 00:00:00 | 31dec1899 00:00:00 | 31dec1899 00:00:00 |
31dec1899 00:00:00 | 31dec1899 00:00:00 | 31dec1899 00:00:00 |
I have tried the conversion from 1900s Excel time to Stata time, but after I do the formatting step, it still displays the time as this -1.63577e+20.
https://blog.stata.com/2011/01/05/us...ther-software/
I tried creating a baseline time variable of Excel in Stata as 31dec1899 00:00:00 and using that to subtract my time variables against, but when I try to create that time variable in Stata, I can only go back to 31dec1959 23:59:38.
*Note: I am using Stata 15
Thank you for your help,
Amelia
Comment