aligned with a specified origin.
+
+date_trunc(stride, source, origin)
+
+ source is a value expression of type
+ timestamp or timestamp with time zone. (Values
+ of type date are cast automatically to
+ timestamp.) stride is a value
+ expression of type interval. The return value is likewise
+ of type timestamp or timestamp with time zone,
+ and it marks the beginning of the bin into which the
+ source is placed.
+
+
Examples:
that date_bin can truncate to an arbitrary interval.
+ Negative intervals are allowed and are treated the same as positive intervals.
+
+
The
stride interval cannot contain units of month
or larger.