DRILL-1353: Fix decimal regressions
DRILL-1354: Fix date truncate functions to use toString helper functions.
Minor cleanup: move the truncate logic in a separate template