My table has an date column 'orderdate' with type as yyyy-mm-dd I want to get the date difference against getdate()
select getdate() - orderdate from table
this should return the number of days
My table has an date column 'orderdate' with type as yyyy-mm-dd I want to get the date difference against getdate()
select getdate() - orderdate from table
this should return the number of days