My dataset includes exams information:
1. starttime - the hour the exam started
2. duration_hours - the exam duration in hours.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str5 starttime double duration_hours " 9:00" -1.8934488e+12 " 9:00" -1.8934452e+12 " 9:00" -1.8934452e+12 " 9:00" -1.8934452e+12 " 9:00" -1.8934488e+12 " 9:00" -1.8934488e+12 " 9:00" -1.8934452e+12 " 9:00" -1.8934488e+12 " 9:00" -1.8934488e+12 end format %tcHH:MM:SS duration_hours
It should look like this for starttime:
| Orginial starttime | New starttime |
| 9:00 | 900 |
| 10:30 | 1030 |
| 14:30 | 1430 |
| Original duration_hours | New duration_hours |
| 15:30 | 1530 |
| 18:00 | 1800 |
Thanks in advance!
0 Response to Reformating hour variable
Post a Comment