Skip to main content
Brian Cline

Solution Architect skilled in Salesforce, NetSuite and JavaScript Development

Menu

Skip to content
  • JavaScript
  • Resume
  • Home
  • About
  • Contact
  • Articles

SQL Server – Get Only the Date

August 17, 2011
Brian Cline
SQL Server No Comments
Sharing is Caring

Very often, I need the date of some data and do not like to convert the date to a varchar and then proceed to format it or convert it back to a date.

One of the official Microsoft sanctioned ways is:
SELECT DATEADD(dd,0,DATEDIFF(dd,0,GETDATE()))

Sharing is Caring

Related Posts:

  • Get List of Tables and Creation Date from SQL Server
    Get List of Tables and Creation Date from SQL Server
  • SQL Server Reporting Services - Can't Sign In
    SQL Server Reporting Services - Can't Sign In
  • Book Review: SQL Pocket Guide
    Book Review: SQL Pocket Guide
  • PHP MS SQL Truncated VarChar(255)
    PHP MS SQL Truncated VarChar(255)
  • SQL University & #SQLHelp On Twitter
    SQL University & #SQLHelp On Twitter
  • Windows Server 2008 - SMTP Doesn't Work on Restart
    Windows Server 2008 - SMTP Doesn't Work on Restart

Post navigation

Previous post: Hosts File Location On Windows
Next post: Why I Recommend PayPal

Tag Cloud

api Athabasca AWS aws lambda best practices Book Review c# Chrome Clean Code cloud computing CMS css Database Drupal enterprise integration patterns firefox javascript jQuery learning javascript Learning Salesforce Magento Microsoft netsuite NodeJS PHP Programming rest api restful api Salesforce Salesforce Apex Salesforce API Salesforce Best Practices salesforce integration Salesforce Lead Salesforce Lightning Serverless Serverless Computing serverless frameworks SOAP API software architecture SOQL Testing visualforce Windows WordPress

Latest Posts

  • Implementing Paging in a REST API
  • How to find API gateway URLs
  • Sorting in a REST API
  • Date and DateTime Handling in APIs
  • Is SOAP dead?