I have this SQL query:
SELECT DISTINCT
[BatchCode]
,SUM([Quantity]) as 'Created'
,[TotalQuantity]
,[Status]
,[Destination]
,[DateCreated]
,[CreatedBy]
FROM [FGIS].[dbo].[DropshipPackinglist]
GROUP BY BatchCode, TotalQuantity, Status, Destination, CreatedBy, ModifiedBy, DateCreated
The Result is this:
BatchCode Created TotalQuantity Status Destination DateCreated CreatedBy
---------------------------------------------------------------------------------------------------------------
0005041007100AHWA11HG 86 86 CREATED MediTelecom S.A. 2010-09-10 00:00:00.000 NULL
0005041007100AHWA11HGK 19 50 ALLOCATED USA 2010-09-12 07:35:17.000 jy
0005041007100AHWA11HGK 31 50 ALLOCATED USA 2010-09-12 07:35:20.000 jy
My Problem now is I can't Group DateCreated because of it has different time .
I want to group it by date only. Example: 2010-09-12
Thanks and regards...