Date Functions and Arithmetic — Free SQL Tutorial
Learn Date Functions and Arithmetic in SQL with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
TL;DR: Learn Date Functions and Arithmetic in SQL with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated
Date Functions and Arithmetic in SQL
DATE_ADD() and DATE_SUB() add or subtract intervals from dates.
DATEDIFF() calculates the number of days between two dates.
EXTRACT() retrieves specific components (YEAR, MONTH, DAY, HOUR, etc.) from dates.
DATE_FORMAT() converts dates to custom string formats.
LAST_DAY() returns the last day of the month for a given date.
Learn Date Functions and Arithmetic step by step with Syllab's free interactive SQL tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full SQL course →