|
Posted by kirke on 11/02/06 18:53
Hi,
I have a datetime column named dtDateTime.
its format is "Oct 27 2006 12:00:00 "
I want to group by only date part of it and count
my code is
$sql1="SELECT convert(varchar,J1708Data.dtDateTime,120),
count(convert(varchar,J1708Data.dtDateTime,120))
FROM Vehicle INNER JOIN J1708Data ON Vehicle.iID = J1708Data.iVehicleId
WHERE (J1708Data.iPidId = 303) AND
(J1708Date.dtDateTime between '2006-10-25' AND '2006-10-28')
AND (Vehicle.sDescription = $VehicleID)
GROUP BY convert(varchar,J1708Data.dtDateTime,120)";
However, convert part, group by part doesnt' work at all.
(i couldn't check count part)
can you find where's the problem?
Thx.
Navigation:
[Reply to this message]
|