SQL Date / Datetime convert?

Hi,

How can I write a query to sum up the amount group by date (not datetime) of the following data?

MyDate / Amount
2007-08-15 16:13:21 / 2500
2007-08-15 16:14:24 / 5000
2007-08-18 10:19:00 / 1000
2007-08-18 10:19:04 / 12000

Thanks! :slight_smile:

Of course, this query is NOT works…

SELECT date, sum(amount) FROM mytable GROUP BY date;

I have tried to use Convert …
but seems there exists an error… :frowning:

 
select convert(varchar(20), MyDate, 101) from mytable;