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