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
Post a Comment