Collections:
Date and Time Intervals in MySQL
What Are Date and Time Intervals in MySQL?
✍: FYIcenter.com
A date and time interval is special value to be used to increment or decrement a date or a time at a given date or time unit. A data and time interval should be expression in the format of "INTERVAL expression unit", where "unit" and "expression" should follow these rules:
unit expression value format MICROSECOND MICROSECONDS SECOND SECONDS MINUTE MINUTES HOUR HOURS DAY DAYS WEEK WEEKS MONTH MONTHS QUARTER QUARTERS YEAR YEARS SECOND_MICROSECOND 'SECONDS.MICROSECONDS' MINUTE_MICROSECOND 'MINUTES.MICROSECONDS' MINUTE_SECOND 'MINUTES:SECONDS' HOUR_MICROSECOND 'HOURS.MICROSECONDS' HOUR_SECOND 'HOURS:MINUTES:SECONDS' HOUR_MINUTE 'HOURS:MINUTES' DAY_MICROSECOND 'DAYS.MICROSECONDS' DAY_SECOND 'DAYS HOURS:MINUTES:SECONDS' DAY_MINUTE 'DAYS HOURS:MINUTES' DAY_HOUR 'DAYS HOURS' YEAR_MONTH 'YEARS-MONTHS'
⇒ Incrementing a Date by 1 in MySQL
⇐ Converting Character Strings to Dates in MySQL
2017-12-26, 2261🔥, 0💬
Popular Posts:
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
Can Binary Strings Be Converted into NUMERIC or FLOAT Data Types in SQL Server Transact-SQL? Can bin...
How To Format Time Zone in +/-hh:mm Format in SQL Server Transact-SQL? From the previous tutorial, y...
How To Install Oracle Database 10g XE in Oracle? To install 10g universal edition, double click, Ora...
How To Set Up SQL*Plus Output Format in Oracle? If you want to practice SQL statements with SQL*Plus...