Qore SqlUtil Module Reference  1.7.5
cop_trunc_date formats

These are formatting constant which can be used in cop_trunc_date() formatting argument.

Input date used in the table below: 20.4.2017 14:27:34

Constant Meaning Example
DT_YEAR Truncate date up to year 1.1.2017 00:00:00
DT_MONTH Truncate date up to month 1.4.2017 00:00:00
DT_DAY Truncate date up to day 20.4.2017 00:00:00
DT_HOUR Truncate date up to hour 20.4.2017 14:00:00
DT_MINUTE Truncate date up to minute 20.4.2017 14:27:00
DT_SECOND Truncate date up to second 20.4.2017 14:27:34
Oracle: using DT_SECOND for DATE type does not make sense as the DATE resolution is up to seconds out of the box. On the other side TINESTAMP is truncated up to seconds with this operator.