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.
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.