sql - Subtract minutes from date -


i need subtract number of minutes date.
like:

select @minute=1440 select @datetime='2014-02-05 23:27:51.413'  select @datetime- @minute 

you can use dateadd function manipulate datetime values. if want subtract values can use parameter negative value this

select dateadd(minute, -@minute, @datetime);  

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -