Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Remove time

Author  Topic 

bhanu2217
Starting Member

35 Posts

Posted - 2010-05-02 : 06:59:50
SELECT * FROM be_Posts post
join be_PostCategory Cat on Cat.PostID=post.PostID
where post.DateCreated='5/2/2010 1:12:35 PM' and Cat.CategoryID='709b60b8-d157-4b3c-9b68-e03e47b0d4be'

I want to match only the date and not time.
DateCreated is of type datetime.
Please help.

www.JamboreeBliss.com

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-02 : 07:06:22
SELECT * FROM be_Posts post
join be_PostCategory Cat on Cat.PostID=post.PostID
where (post.DateCreated >='20100502' and post.DateCreated < '20100503')
and Cat.CategoryID='709b60b8-d157-4b3c-9b68-e03e47b0d4be'


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

bhanu2217
Starting Member

35 Posts

Posted - 2010-05-02 : 07:13:33
quote:
Originally posted by webfred

SELECT * FROM be_Posts post
join be_PostCategory Cat on Cat.PostID=post.PostID
where (post.DateCreated >='20100502' and post.DateCreated < '20100503')
and Cat.CategoryID='709b60b8-d157-4b3c-9b68-e03e47b0d4be'


No, you're never too old to Yak'n'Roll if you're too young to die.



Vielen Dank :-)
I have studied German till A1 Level :-)

www.JamboreeBliss.com
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-02 : 07:56:51
Es war mir ein Vergnügen


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-05-02 : 14:06:43
Ich bin ein berliner

------------------------------------------------------------------------------------
Any and all code contained within this post comes with a 100% money back guarantee.
Go to Top of Page

mikrobson
Starting Member

1 Post

Posted - 2010-05-03 : 21:01:29
I just joined this forum to ask the same question, and within a minute I found my answer! You guys are incredible!
I have a hosted Windows server with a VPS hosting company in Atlanta (http://servesouth.com), and have one SQL server and one acting as a file server for a bunch of school websites. I will definitely be coming back here for future issues! Thanks for helping a newbie!

Rob Frierson
www.servesouth.com
Go to Top of Page
   

- Advertisement -