Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mike13
Posting Yak Master
219 Posts |
Posted - 2012-02-09 : 11:14:09
|
Hi all,i got this selectSelect count(orderid) as amounts, shipdate from T_Order_Lost_Log group by shipdateproblem is the shipdate field, has time in it also.How can ai group just on the year,month,day ?thanks a lot |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-02-09 : 11:21:14
|
Select count(orderid) as amounts, dateadd(d,datediff(d,0,shipdate),0) as shipdate from T_Order_Lost_Log group by dateadd(d,datediff(d,0,shipdate),0) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
mike13
Posting Yak Master
219 Posts |
Posted - 2012-02-09 : 11:42:24
|
Thanks a lot :-) |
 |
|
|
|
|