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 dateWith Columns
sql
1SELECT name, DATE(created_at) AS join_date
2FROM students;
Extracts date from datetime.
1SELECT DATE('2024-03-15 14:30:00');
2-- Returns: 2024-03-15
3
4SELECT DATE('now');
5-- Returns: current date1SELECT name, DATE(created_at) AS join_date
2FROM students;