I recommend you read up on Date Formats and Date Literals in the SOQL and SOSL Reference
. This resource covers several ways you can format date fields that you may find useful in the future. Specifically for your current use case:
Date Literal
LAST_N_DAYS:n
Range
For the number n provided, starts 00:00:00 of the current day and continues for the past n days.
Example
SELECT Id FROM Account WHERE CreatedDate = LAST_N_DAYS:365