I changed cfsqltype="cf_sql_timestamp" to cfsqltype="cf_sql_date"
Shouldn't make a difference. Not unless you're storing times too, not just dates. Are you? Also, what db type?
It will not output if the selectedDate = dayleft.
Let's do some debugging. Grab all records for resident #193. Can you dump the dates only. Then post the results. So we can see why they're not matching?
<cfquery name="checkResident" ...>
SELECT dayleft , dayreturned
FROM hospital
WHERE residentID = 193
</cfquery>
Debugging stuff <br>
selectedDate = <cfdump var="#selectedDate#">
<cfdump var="#checkResident#">