When I tried to get amount and date values from a SQL Server database using the query
select Amount, RunDate
from zComm
WHERE ID = '1339812'
It is not returning any data. But when I convert date to string it is working query is
select Amount, convert(varchar, RunDate) as RunDate
from zComm
WHERE ID = '1339812'
Now I want to show the Amount in the descending order of RunDate and I used the query
select Amount, convert(varchar, RunDate) as RunDate
from zComm
WHERE ID = '1339812'
order by RunDate;
But the result I got is not in descending order. I have attached the screenshot of the result query.

Try using the
DESCkeyword. So your query would becomeIt is likely it is ordering by the
CHARrepresentation and not the date.I hope this helps.