I would like to get data between two years, so from 1st of Jan to 1st of Jan, This is what i have done:
public list<a>method(){
DateTime d= new DateTime(DateTime.Now.Year, 01, 1);
DateTime dd= new DateTime(DateTime..Year, 01, 1); <- instead 'now' what is the syntax for next year?
SqlCommand command = new SqlCommand("SELECT TOP 100 ID FROM TableNameWHERE Time Between @Time AND @Time1 ORDER BY Time OFFSET 10 ROWS FETCH NEXT 100 ROWS ONLY", conn);
command.Parameters.AddWithValue("@Time", d);
command.Parameters.AddWithValue("@Time1", dd);
}