I need to extract the hours from the "cadenas_time" variable (including decimal points).
For instance, 2:10:13 would be converted to 2.17 (2 hours + 10/60 = 0.17)
Could someone help?
Thank you very much.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int year byte month int dm str9 country str8 cadenas_time 2012 1 624 "Venezuela" "20:42:57" 2012 2 625 "Venezuela" "26:24:27" 2012 3 626 "Venezuela" "11:59:00" 2012 4 627 "Venezuela" "6:49:20" 2012 5 628 "Venezuela" "7:41:59" 2012 6 629 "Venezuela" "18:22:52" 2012 7 630 "Venezuela" "15:57:50" 2012 8 631 "Venezuela" "19:33:40" 2012 9 632 "Venezuela" "9:22:41" 2012 10 633 "Venezuela" "2:39:28" end format %tm dm
0 Response to Extracting hours (including decimal part) from string variable in hh:mm:ss
Post a Comment