DateTime field...how do you remove the time?

Posted on 2005-03-18
Medium Priority
Last Modified: 2012-08-14
What is the easiest way to strip out the time in a sql server db datetime field?
Front end is ASP.Net/VB.Net...would prefer to do it in SQL Server?
Question by:samtran0331
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Accepted Solution

Kevin3NF earned 300 total points
ID: 13579256
You mean something like:

Select Convert(varchar(11), getdate(),101)

(1 row(s) affected)

Assisted Solution

AutomaticSlim earned 200 total points
ID: 13579294
Or this....

Select CONVERT(CHAR(10), getdate(), 101)
LVL 37

Author Comment

ID: 13579305
Thanks guys!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question