Re: Date and not DateTime
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 01/16/05
- Next message: TheBook: "Re: Inventory Query Help Needed"
- Previous message: Tom: "Date and not DateTime"
- In reply to: Tom: "Date and not DateTime"
- Next in thread: Tom: "Re: Date and not DateTime"
- Reply: Tom: "Re: Date and not DateTime"
- Messages sorted by: [ date ] [ thread ]
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 > >
- Next message: TheBook: "Re: Inventory Query Help Needed"
- Previous message: Tom: "Date and not DateTime"
- In reply to: Tom: "Date and not DateTime"
- Next in thread: Tom: "Re: Date and not DateTime"
- Reply: Tom: "Re: Date and not DateTime"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|