display datetime column with data and time in sql server

Hi experts,

I'm using sql server 2008 R2.

This is table is a copy of the Employees table found in the Northwind Database.

I have a table called TestEmployees that looks like this:

TestEmployees table
If you notice the Birthdate column, this is a datetime datatype.

The format for that column is: 1948-12-08 00:00:00.000

I want to create a column that returns the date format in this format:   12/08/1948 00:00:00.000

When I run this

SELECT [EmployeeID]
      ,[LastName]
      ,[FirstName]
      ,[Birthdate]
      -- convert DateTime to varchar
      ,CONVERT(varchar(30), [BirthDate], 101) AS BirthDate2
      ,CONVERT(varchar(30), [BirthDate], 110) AS BirthDate3
      -- convert varchar to DateTime
      ,CONVERT(SMALLDATETIME, REPLACE([BirthDate], '@', ' '), 110) as BirthDate4
      -- convert varchar to DateTime
      ,CONVERT(SMALLDATETIME, REPLACE([BirthDate], '@', ' '), 101) as BirthDate5  
FROM [Employees]


I get this:

my query

Here is my fiddle for it

http://sqlfiddle.com/#!3/74511/1


Anyone know the syntax to create a column that returns the BirthDate column in this format:   12/08/1948 00:00:00.000
LVL 1
maqskywalkerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Looking in SQL expert PortletPaul's article SQL Server Date Styles (formats) using CONVERT() that would be SELECT convert(varchar, Birthdate ,101) for just the date.  Not abundantly certain you can do the formatting and the time component.
0
Scott PletcherSenior DBACommented:
You'll need to combine two formats:

SELECT CONVERT(char(11), [BirthDate], 101) + CONVERT(varchar(12), [BirthDate], 114)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.