Re: Date and not DateTime

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 01/16/05


Date: Sat, 15 Jan 2005 22:56:03 -0500

Use CONVERT, e.g.:

SELECT CONVERT(VARCHAR, getdate(), 112) AS YYYYMMDD

... Look up all of the styles (the final parameter) in BOL, in the topic
"CAST and CONVERT".

-- 
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Tom" <Tommster2004@hotmail.com> wrote in message
news:eh6g543%23EHA.2156@TK2MSFTNGP10.phx.gbl...
> Hi
>
> How do i display the Date and only the Date working with DatePart?
>
> ch Tom
>
>


Relevant Pages

  • Re: Date and not DateTime
    ... SELECT CONVERT, 112) AS YYYYMMDD ... Look up all of the styles in BOL, ... "CAST and CONVERT". ... -- "Tom" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Re: More Ann Coulter nonsense
    ... We'd better find a bathroom soon, said Tom, asstootly. ... "The power of the Executive to cast a man into prison without formulating any ...
    (talk.origins)
  • Re: Matt Smith is the 11th Doctor!
    ... Not a bad thing in itself as Tom ... Baker was an "unknown" when he was cast, ...
    (uk.media.tv.sf.drwho)
  • Re: Brady Already Out of "Cast"
    ... this is a pic of Tom and Gisele ... last night, no "cast", walking just fine. ...
    (alt.sports.football.pro.ne-patriots)
  • Re: Where *IS* Tom?
    ... "Why do you repeatedly find it necessary to cast others in a negative ... You are the man with all the answers Tom. ... Or has the bully turned into a coward, ... Come on, player. ...
    (sci.crypt)