TIMESTAMPADD(unit,interval,datetime_expr) adds the integer expression interval to datetime_expr
|
The unit for interval is given by the unit argument. |
The unit value may be specified with a prefix of SQL_TSI_. |
For example, DAY and SQL_TSI_DAY both are legal. |
The unit should be one of the following values: |
- FRAC_SECOND,
- SECOND,
- MINUTE,
- HOUR,
- DAY,
- WEEK,
- MONTH,
- QUARTER, or
- YEAR.
|
mysql> mysql> mysql> SELECT TIMESTAMPADD(MINUTE,1,'2003-01-02'); +-------------------------------------+ | TIMESTAMPADD(MINUTE,1,'2003-01-02') | +-------------------------------------+ | 2003-01-02 00:01:00 | +-------------------------------------+ 1 row in set (0.02 sec)
|
|
|
Related Scripts with Example Source Code in same category :
-
-
-
-
-
-
-
-
|
|