SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice - Part 2

Posted by: Journey to SQL Authority with Pinal Dave, on 18 Oct 2008 | View original | Bookmarked: 0 time(s)

A year ago I wrote post about SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice where I have discussed two different methods of getting datepart from datetime.Method 1:SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE()))Method 2:SELECT CONVERT(VARCHAR(10),GETDATE(),111)I have summarized my post suggesting that either method works fine and I prefer to [...]...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1776 | Hits: 69

Similar Posts

  • Eschewing Date Types in our Database more
  • format-DateTime with XSL more
  • LINQ Tip of the week: System.DateTime support more
  • Lets build an Application Together. more
  • Eloquera Database - the web-oriented client/server object database for .NET more
  • New Date Data Types in Microsoft SQL Server 2008 more
  • SQL SERVER - Few Useful DateTime Functions to Find Specific Dates more
  • Client Cache Headers more
  • Repairing SQL 2005 Business Intelligence Studio after uninstalling VS2005 more
  • JSON and Date Embedding more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD