villelink

Ramblings of a computer programmer.

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • About
  • About
  • Never Ending Kart Battle – Current
  • OLFFL Rankings 2008

Monthly Archives: September 2009

T-SQL Only return date in a date time.

Posted on September 3, 2009 by admin
Reply

Every once in a great while I need to just return the date of a date time and forget about the time part of it.

SELECT CAST(FLOOR(CAST(getDate() AS FLOAT)) AS DATETIME) as MyDate

Obviously you can replace getDate() with a column.

Posted in Coding, Databases, MSSQL2005, SQL Server, T-SQL | Leave a reply

Archives

  • March 2010
  • September 2009
  • August 2009
  • July 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • April 2008
  • March 2008

Meta

  • Log in

Recent Posts

  • JumpDomains is gone, how to get your domains off.
  • T-SQL Only return date in a date time.
  • Windows7: VS2005 Publish Web Site
  • Steve Czaban Podcast
  • Play Freecol from SVN
  • EA NCAA Football – Academic Prestige
  • First Days of AnkhSVN
  • Database Mail not responding…
  • EA Sports NCAA Football Recruiting Guide
  • Make Images Look Like They Do In The WordPress Editor!
  • Kyle XY = Stranger In A Strange Land
  • How to turn GridFocus WordPress Theme Into 2 Columns
  • Goodbye AxWebBrowser
  • York County Archives Deserves Some Credit
  • IE7 broke my AxWebbrowser!!!

Pages

  • About
  • About
  • Never Ending Kart Battle – Current
  • OLFFL Rankings 2008
Proudly powered by WordPress