Home >> FAQs/Tutorials >> MySQL Tutorials
MySQL Tutorial - Date and Time Intervals
(Continued from previous topic...)
What Are Date and Time Intervals?
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
DAY_SECOND 'DAYS HOURS:MINUTES:SECONDS'
DAY_MINUTE 'DAYS HOURS:MINUTES'
DAY_HOUR 'DAYS HOURS'
(Continued on next topic...)
- What Are Date and Time Data Types?
- How To Write Date and Time Literals?
- How To Enter Microseconds in SQL Statements?
- How To Convert Dates to Character Strings?
- How To Convert Character Strings to Dates?
- What Are Date and Time Intervals?
- How To Increment Dates by 1?
- How To Decrement Dates by 1?
- How To Calculate the Difference between Two Dates?
- How To Calculate the Difference between Two Time Values?
- How To Present a Past Time in Hours, Minutes and Seconds?
- How To Extract a Unit Value from a Date and Time?
- What Are Date and Time Functions?
- What Is TIMESTAMP Data Type?
- How Many Ways to Get the Current Time?