Skip
Arish's avatar

112. DATE Function


DATE Function

Extracts date from datetime.

sql
1SELECT DATE('2024-03-15 14:30:00');
2-- Returns: 2024-03-15
3
4SELECT DATE('now');
5-- Returns: current date

With Columns

sql
1SELECT name, DATE(created_at) AS join_date
2FROM students;