Description
trunc(string date[, string format]): string
trunc(date date[, string format]): date
Returns date truncated to the unit specified by the format (as of Hive 1.2.0). Supported formats: MONTH/MON/MM, YEAR/YYYY/YY. If format is omitted the date will be truncated to the nearest day. Example: trunc('2015-03-17', 'MM') = 2015-03-01.
Attachments
Issue Links
- relates to
-
SPARK-8864 Date/time function and data type design
- Resolved
- links to