I have a code snippet where I am fetching rows from a database and finding dateDiff from one of the columns in the query.
<cfquery name="querySearchUUID" maxrows="1">
SELECT [DateInvited]
FROM [INVITE_PERSON]
WHERE [UUID] =
<cfqueryparam value="#arguments.userUUID#"cfsqltype="cf_sql_varchar">
</cfquery>
<cfif querySearchUUID.RecordCount EQ 1>
<cfif dateDiff('h', querySearchUUID.DateInvited, now()) LTE 24>
<cfreturn true>
<cfelse>
<cfreturn false>
</cfif>
<cfelse>
<cfreturn false>
</cfif>
However when I change the code querySearchUUID.DateInvited
to querySearchUUID['DateInvited']
in the dateDiff()
It fails I dont know why.
Here was the error it produced.
The value class coldfusion.sql.QueryColumn cannot be converted to a date.
Can anyone please explain me what exactly is the difference. Thank you.