Modified stats funcs/queries to calc ts start/end dates correctly