This question already has an answer here:
I want to change 2 , 3 and 4 digits numbers in excel file into hour and minute format without dots between the numbers. for example I have 83 and 114 and 1159 . I want to write a function in r that can consider the first two digits from the right as minutes and the third and forth as hour , so for 114 the function should consider 14 as minutes then 1 as an hour and the same for other numbers.
for clarification my question is how to change 83, 141, to hour and minutes without dots 141= 0141 and 83 = 0123 and so on
thanks Salem
This is a very specific function to write, and I do not know if this is the best way to do this, but this will read any two digits to the right as min and any two to the left as hrs. If the mins is over 60 it will add it to the overall hours.
Then we call the function written above...