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)
 Check if timestamp > [some time stamp]

Author  Topic 

CoffeeAddict
Yak Posting Veteran

94 Posts

Posted - 2010-04-22 : 16:25:57
Trying to just pull certain records after a certain period of time:

and createdOn > datetime('2010-04-22 13:36:23.957')

to me it looks fine but the compiler says it doesn't recognize datetime as a keyword

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-22 : 16:30:09
and createdOn > '2010-04-22 13:36:23.957'

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

Subscribe to my blog
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-04-22 : 16:30:25
You dont need that datetime().
createdOn > '2010-04-22 13:36:23.957'
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-04-22 : 16:30:46
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-22 : 16:31:06


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

Subscribe to my blog
Go to Top of Page

CoffeeAddict
Yak Posting Veteran

94 Posts

Posted - 2010-04-22 : 16:31:20
thanks..I guess I didn't think SQL could do it with a simple string.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-22 : 16:32:07
No problem.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -