allow date_trunc on long and string literals

(cherry picked from commit 608903e6b5802c76e4594d87be639c6b2a1364c2)