TIME Function
Extracts time from datetime.
sql
1SELECT TIME('2024-03-15 14:30:00');
2-- Returns: 14:30:00
3
4SELECT TIME('now');
5-- Returns: current timeExample
sql
1SELECT name, TIME(login_time) FROM users;
Extracts time from datetime.
1SELECT TIME('2024-03-15 14:30:00');
2-- Returns: 14:30:00
3
4SELECT TIME('now');
5-- Returns: current time1SELECT name, TIME(login_time) FROM users;