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 |
meef
Posting Yak Master
113 Posts |
Posted - 2015-01-23 : 13:22:55
|
I have a field that is stored as a smalldatetime but I want to filter on that field only for the date. How do I ignore the time stamp and only go by the date? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-01-23 : 13:31:14
|
You can use this: DATEADD(dd, DATEDIFF(dd, 0, yourcolumngoeshere), 0)Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
meef
Posting Yak Master
113 Posts |
Posted - 2015-01-23 : 14:00:28
|
Thanks, that did the trick. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-01-23 : 14:02:36
|
You're welcome, glad to help.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|