Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datetime

Status
Not open for further replies.

JChanana

MIS
May 14, 2001
3
US
Is there a way I can query on just the date or just time element in the datetime datatype? I didn't see an option using datepart. Must I use the convert? Is there another option like truncating the time or date out?
 
You can use CONVERT to display and search dates and times in a variety of formats. I suppose you could try other functions or even create your own in SQL 2000 but CONVERT is easy to use and very powerful. Terry

"I shall try to correct errors when shown to be errors, and I shall adopt new views so fast as they shall appear to be true views." - Abraham Lincoln
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top