Is there a way I can query on just the date or just time element in the datetime datatype? I didn't see an option using datepart. Must I use the convert? Is there another option like truncating the time or date out?
You can use CONVERT to display and search dates and times in a variety of formats. I suppose you could try other functions or even create your own in SQL 2000 but CONVERT is easy to use and very powerful. Terry
"I shall try to correct errors when shown to be errors, and I shall adopt new views so fast as they shall appear to be true views." - Abraham Lincoln
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.