Skip to content

SQL TSQL

Aichaellee edited this page May 28, 2018 · 2 revisions

timestamp substract some minutes

SELECT DATEADD(minute, -15, '2000-01-01 08:30:00'); 
select now() - cast('2 minute' as interval)

https://stackoverflow.com/questions/2309028/subtract-minute-from-datetime-in-sql-server-2005

Clone this wiki locally