I recommend you read up on [Date Formats and Date Literals](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm) 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