Take a look at a better solution for the above issue here.
Also, I think your solution might be in the roundTo expression.