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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 count

Author  Topic 

kt
Yak Posting Veteran

88 Posts

Posted - 2011-09-16 : 10:59:09
i have the w_date field desing as smalldatime format and stored values such as
2003-12-23 10:23:00
2003-12-24 12:10:00

i want to findout the afternoon records but not sure if i have it corrected?

((datepart(hh,w_date)*100+datepart(mi,w_date))>1200)

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-16 : 11:09:52
What are "afternoon records"?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

kt
Yak Posting Veteran

88 Posts

Posted - 2011-09-16 : 11:16:25
i think the record submitted after 12
2003-12-24 12:10:00?

quote:
Originally posted by tkizer

What are "afternoon records"?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-16 : 11:27:10
Sure, your solution will work for that
Go to Top of Page

kt
Yak Posting Veteran

88 Posts

Posted - 2011-09-16 : 12:01:03
cool, thanks alot.
quote:
Originally posted by russell

Sure, your solution will work for that

Go to Top of Page
   

- Advertisement -