Open
Description
Is your feature request related to a problem?
MySQL has no such type, at least visible to user, but having a such type we can simplify processing few datetime functions.
... number in YYMMDD, YYMMDDhhmmss, YYYYMMDD, or YYYYMMDDhhmmss format. If the argument includes a time part, it may optionally include a fractional seconds part.
See PERIOD_ADD
/PERIOD_DIFF
functions in MySQL docs for reference.
The proposed solution would help fixing NOW() + 0
issue, see discussion in #754 and Bit-Quill#92.
What solution would you like?
A new data type PERIOD
- Responsible for parsing and formatting
- Couldn't be casted to numeric types
- Expose a numeric type for user
- Has operators
+
and-
overloaded with integers.
This will also simplify UNIX_TIMESTAMP
implementation (#835)
Other functions affected: all listed in #754, EXTRACT
, UTC_DATE
, UTC_TIME
and UTC_TIMESTAMP
(link).
What alternatives have you considered?
Keep using numeric type.