Question: I want to display all customers who placed an order during 2010. When I display "customerid" and "orderdate" from the custorder table, the format looks like this:

```
C-300064    06-DEC-10

```

Basically I need to figure out how to get it to display only customerid where the last 2 digits of orderdate are 10.

Can someone help me out please?

Answer: 
> 
> I'm wanting to display all customers who placed an order during 2010.
> 
> 
> 

As simple as:

```
SELECT  customerid , orderdate
FROM your_table
WHERE orderdate >= DATE '2010-01-01' AND orderdate < DATE '2011-01-01';

```

If orderdate is `DATE` column then how it is displayed doesn't matter. `DATE 'YYYY-MM-DD'` literal does not depend on your session `NLS_DATE_FORMAT`.
Since you are using Oracle, this will work.

```
SELECT 
      customerid
    , orderdate
FROM yourtable 
WHERE EXTRACT(YEAR FROM orderdate) = 2010;

```