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 |
1sqlover
Yak Posting Veteran
56 Posts |
Posted - 2006-10-26 : 10:34:42
|
How can I SELECT DISTINCT Dates in a table as a Date not a timestamp?10-01-2006 00:05:0610-01-2006 12:53:3110-02-2006 04:20:3010-03-2006 05:30:5410-03-2006 06:30:30AS10-01-200610-02-200610-03-2006Thanks, |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-10-26 : 10:35:51
|
[code]select distinct dateadd(day, datediff(day, 0, datecol), 0)from table[/code] KH |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-26 : 11:08:56
|
Where do you want to show data?MadhivananFailing to plan is Planning to fail |
 |
|
1sqlover
Yak Posting Veteran
56 Posts |
Posted - 2006-10-26 : 11:29:15
|
Thanks, KHTAN it worked.quote: Originally posted by khtan
select distinct dateadd(day, datediff(day, 0, datecol), 0)from table KH
|
 |
|
|
|
|