# Write a SOQL query to fetch all Cases created Today (WHERE CreatedDate = TODAY).

**Topic:** Development · **Difficulty:** Easy · **Asked at:** Tech Mahindra, HCL, Birlasoft · **Tags:** soql, scenario, date-literals

Read it on the site: https://www.forcechallenges.com/interview-questions/write-a-soql-query-to-fetch-all-cases-created-today-where-createddate-today

## Answer

Compare `CreatedDate` with the `TODAY` date literal. It handles the datetime-to-date comparison using the user's time zone.

```soql
SELECT Id, CaseNumber, Subject FROM Case WHERE CreatedDate = TODAY
```

---
Source: ForceChallenges · last updated 2026-10-19
