c# - Need to get last 60 days of Files from SQL Server database -


i working in ado.net. have table saved files. when files saved save date , time sql function getdate(). need hit query in database fetch last 60 days data current date. there function or query scenario?

assuming there column called datesaved stores date when record saved:

select * yourfiles datesaved > dateadd(d, -60, getdate()) 

the d means adding units of 'day', -60 means adding negative 60 of them, , means adding negative 60 days current date.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -