May 24, 2006 #1 HLPCH IS-IT--Management Joined Jul 12, 2004 Messages 47 Location US hi, How could I extract only the date from a Datetime field? Example: "12/22/2005 12:00:00" I need only 12/22/2005. thanks in advance.
hi, How could I extract only the date from a Datetime field? Example: "12/22/2005 12:00:00" I need only 12/22/2005. thanks in advance.
May 24, 2006 #2 SQLDenis Programmer Joined Oct 1, 2005 Messages 5,575 Location US select convert(varchar(10),getdate(),101) replace getdate() with your columname or variable Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/ Upvote 0 Downvote
select convert(varchar(10),getdate(),101) replace getdate() with your columname or variable Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/