Below function can be used in your query to get Year, Month, Day of date separated from Date.
SELECT year(from_date) AS yyyy, month(from_date) as mm, day(from_date) as dd FROM test
Note: Here test is table and from_date is field with DateTime datatype.