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)
 how to find out the last 20 mins from getdate

Author  Topic 

goodsolution
Starting Member

38 Posts

Posted - 2009-06-02 : 11:13:22
i am trying to get the last 20 mins from the getdate()

i mean to say
if getdate is 2009-06-02 10:10:20.147

i should get the date value as 2009-06-02 09:50:20.147

-Thanks

kira
Starting Member

17 Posts

Posted - 2009-06-02 : 11:18:55
select dateadd(minute, -20, getdate())
Go to Top of Page
   

- Advertisement -