I want to show distinct Year in my currenttime database field which is actually timestamp by structure.
I want to show years like :-
2013,
2012,
2011 and so on .
but the problem , the result of my query gives me
10-09-2013 12:11:17
10-09-2012 12:11:14
10-09-2011 12:11:17
which i want as shown above i .e 2013,2012,2011 and so on....
<?php echo $currentyear= date("Y");?>
$query_rs_dyear = "Select DISTINCT complaint.currenttime from complaint WHERE complaint.currenttime!='$currentyear' order by '$currentyear' desc";