strip date reduce function