How to add time to logic number

Have a look here, how to calculate:
Why does this not work? (logic to calculate an average and save the result)