Groups | Blog | Home
all groups > sql server programming > december 2006 >

sql server programming : Converting the datetime output


Amy
12/3/2006 6:59:00 PM
Hello all,
I have a filed which contains a datatime format so when I select from that
field I get somthing like :
2006-11-09 00:00:00.000

I need a way to convert that output to give me only the date in the
following format :

11-09-2006

I tried using the following
CONVERT(VARCHAR(10),TR.WorkDate,11) AS WorkDate
but the output will look somthing like :

06/11/09

Tom Cooper
12/3/2006 10:52:27 PM
CONVERT(VARCHAR(10),TR.WorkDate,110) AS WorkDate

Tom

[quoted text, click to view]

ML
12/4/2006 4:26:00 AM
Amy,

Save this link for future reference:
http://msdn2.microsoft.com/en-us/library/ms187928.aspx


ML

---
AddThis Social Bookmark Button