Guided Notes
Dates & Built-in Functions
Date and time functions, DATE_FORMAT and date arithmetic, string functions, and numeric functions — MySQL's function reference in practice.
Date and time types
Slide 1 / 5• DATE — '2025-03-15' • TIME — '14:30:00' • DATETIME — '2025-03-15 14:30:00' (no time zone) • TIMESTAMP — like DATETIME but stored in UTC and converted to the session time zone • YEAR — 2025
Current values: NOW() (date and time), CURDATE() (today), CURTIME(), UTC_TIMESTAMP().
Always store dates in date types, never as text — you lose sorting, validation, and date math.
