Implemented date trunc'ing for sqlite only