I know there were some questions about this, but I cannot fix my problem.
I upload the CSV file to tablesorter, but one of my columns is the dates (December 23, 2009). But they are sorted as December 2, December 23, December 3, December 31.
Does anyone know a solution? Here you can see the problem , this is the table below. Thanks for that in advance!
<script type="text/javascript" charset="utf-8">
$(document).ready(function()
{
$("#tablesorter-demo2").tablesorter({ widgets: ['zebra'] });
}
);
</script>
-
table width = "871" border = "0" cellpadding = "0" cellspacing = "1" class = "TableSorter" ID = "TableSorter-demo">
$row = 1;
$handle = fopen("csv/canadatransactions.csv",
"g"); while (($ data = fgetcsv ($ handle, 1000, ","))! == FALSE) {$ num = count ($ data); $ Lines ++;
if ($row == 2)
{
echo "<thead>\n<tr>\n";
echo "<th class=\"header\">" . $data[1] .
"\ ";// ". $data [0]." \ ";// " ". $data [2]." \ ";// " ". $data [3]." \ ";// " ". $data [4]." \ ";// " ". $data [5]." \ ";// " ". $data [6]." \ ";//
echo "</tr>\n</thead>\n<tbody>";
}
else
{
echo "<tr class=\"even\"";
echo ">\n";
echo "<td>" . $data[1] . "</td>\n";
echo "<td>" . $data[0] . "</td>\n";
echo "<td>" . $data[2] . "</td>\n";
echo "<td>" . $data[3] . "</td>\n";
echo "<td>" . $data[4] . "</td>\n";
echo "<td>C$ " . $data[5] . "</td>\n";
echo "<td>C$ " . $data[6] . "</td>\n";
$transactions = $row - 3;
}
}
fclose($handle);
?>
</tbody>
</table>