Question: my first query returns me the value 20:

```
    SELECT numberofseats
    from plane
    where tail number in
     ( select flighttailnumberfk
       from flight
       where departuretime between '11/29/2014' and '11/30/2014' and
             flightdepartureairportfk = 'jfk' and
             flightarrivalairport = 'mli'
     )

```

and my second query returns me 1:

```
    select count(reservationseatfk)
    from flight f, reservation r
    where f.departuretime between '11/29/2014' and '11/30/2014' and
          f.reservationflightidfk = f.flightid and r.reservationdeparturetimefk = f.departuretime

```

Now my problem is that I want to subtract the first query from the second query and give me the answer 19. how do i do that?

Answer: 
What is the format you are having in the [Dt Created] variable.

the convert statement you have in the case will convert only the following types below

> 
> YYYY-MM-DD
> 
> 
> YYYY-DD-MM
> 
> 
> DD-MM-YYYY
> 
> 
> 

The error you are getting is since you have a date in the format of "MM-DD-YYYY" something like '12-24-2015'. Due to this you are getting the conversion error.
Excuse me I want to stop you here. Your problem has resolved now but whatever 
***Karthik Venkatraman*** had said is correct. Somehow you got solution but for learning purpose i recommended to investigate little bit more. This is not belongs to the whatever you have said but damm sure this belongs to date-format.

\*\*

**One trick**

Create one DateTimeVariable and once its initialized then just parse it using DateTimeParse class according to the records exist in database.

I am sure you will get solution.. Thanks :)