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: 
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 :)
This is how I finally solved it...

The SQL error message 'Failed Conversion' was absolutely a wrong pointer. It had no connection to the issue at hand. [If only I knew this before :( ] 

The actual problem was that I had called another procedure within the main procedure I had posted above. This setup ran perfectly in SQL management studio which was running under my credentials. Now in the C# application, I had created another SQL login user ID to run it. And this user ID did not have execute permission to run the sub procedure. And ironically, SQL gave me a misleading conversion error. Once I gave the right permission it worked perfectly.