copy smalldatetime date from query result to excel

when I copied the following query result to excel, they showed as 00:00.0

2011-04-20 00:00:00.000
2006-08-17 00:00:00.000
2011-01-10 00:00:00.000
2000-12-13 00:00:00.000
2010-11-04 00:00:00.000
2003-05-28 00:00:00.000
2011-05-17 00:00:00.000
2005-05-02 00:00:00.000
2005-07-25 00:00:00.000
2010-04-30 00:00:00.000

in excel:


I can convert smalldatetime format to date format, but is there any easy way to just copy over the smalldatetime date to the excel?

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.

For this style of output:
2001-02-23 04:05:06.007

convert(varchar, your_data_here ,121)

but smalldatetime is only accurate to the minute
Minimum value          Maximum value         Accuracy  Storage*
1900-01-01 00:00:00 2079-06-06 23:59:00 minute     4 bytes

so you could get by with:

convert(varchar, your_data_here ,120)

which would look like this:
2001-02-23 04:05:06

more on date formats

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
<Potentially stupid answer>
Go into your Excel spreadseet, format cells on that column as a date format that shows the days-months-years, and let us know if it displays correctly.

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
HemlockPrintersAuthor Commented:
converting smalldatetime to date format is the way I did.
format cells on the column as a date format that shows the days-months-years, it works.
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
Printers and Scanners

From novice to tech pro — start learning today.