Grigore Dolghin wrote: > Go for Date datatype if you're using SQL Server 2008. It was a PITA to get > the date part out of the Datetime field in previous versions, especially when > working with date intervals. (If the user enters 2010/06/26 in the textbox, > the server stores it as 2010/06/26 00:00:00, which is smaller than any other > value in the same day. And if you need all the records containing values in > range 2010/06/01 - 2010/06/26, you could not use BETWEEN, but had to resort > to an expression like this: Where OrderDate >= '2010/06/01' And OrderDate < > '2010/06/27')
I never understood why they made it so hard like that. Using that DATEDIFF or whatever function it was was always such a PITA. Good to hear they're using a simple DATE field type now. Was that new in 2008? -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

