There are two problems:
1:
stringdQuery
is of type
Loan
. So you're trying to convert a Loan-object to DateTime. But conversion isn't neccessary in the first place - just access the DateTime-value of stringdQuery.cDate by its .Value-property:
dtt = stringdQuery.cDate.Value;
2: I don't know what your intention is here but your two queries don't make much sense to me: You're querying for the first
Database_CRE_Event
, get its
LastUpdated
-date and then query for the first Database_CRE_Event whose LastUpdated-date is equal to the former. Which will be the same as from the first query. You could as well select the
Date
-property in the first place.