I am trying to get the latest Date with Time in SQL using Max, but I got inaccurate results.
select distinct AccountId,
max (CreateDate)as Date,
text as Info
from comments
group by accountid,text
order by AccountId desc
Expected
I also tried to use max(convert(varchar(20),createdate,120)) as Date
. It's still the same result.
Need assistance.
Thanks