this is ,my query
select *, convert(varchar(20), convert(varchar(2), day(date))+' ' +convert(varchar(3), datename(month, date))+' ' +convert(varchar(4), year(date))) as dat1 from partypaymentdetails
order by sectionname, month(date) ,day(date)
but it show the output like this
24/01/2015
22/01/2014
i need if 2014 details 1st then 2015 details next

Khargesh RajputPosted Apr 30, 2015, 6:43 AM
order by year(date) desc
or
select *, convert(varchar(20), convert(varchar(2), day(date))+' ' +convert(varchar(3), datename(month, date))+' ' +convert(varchar(4), year(date))) as dat1 from partypaymentdetails
order by date desc
Isham KhanPosted Apr 30, 2015, 6:37 AM
order by year(date)
selvi subramanianPosted Apr 30, 2015, 6:34 AM
Isham KhanPosted Apr 30, 2015, 6:29 AM
if this solve ur problem "Mark as Answer" thnx
Khargesh RajputPosted Apr 30, 2015, 6:25 AM