By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,361 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,361 IT Pros & Developers. It's quick & easy.

DATETIME - Time only needed

P: 48
Hi,

I'd like to know how to delete Date part of the DATETIME in SQL Server. I currently have 12/30/1899 12:30:00 AM sort of values in the DB and would like have or use only the Time part.

Thanks
AJ
May 5 '08 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
Hi,

I'd like to know how to delete Date part of the DATETIME in SQL Server. I currently have 12/30/1899 12:30:00 AM sort of values in the DB and would like have or use only the Time part.

Thanks
AJ

Check this out.

-- CK
May 5 '08 #2

P: 24
Here you go:

Expand|Select|Wrap|Line Numbers
  1. Select convert(varchar(10),getdate(),108)
May 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.