You could do it directly in your DB query, such as the following (depending on your DBMS and version):
SELECT YEAR(date_col) as year, MONTH(date_col) as month, DAY(date_col) as day FROM table_name WHERE ...etc....
Or you could explode it in your PHP code:
list($year, $month, $day) = explode('-', $date_from_db);