add a year and subtract a day, using datepart in my query
https://stackoverflow.com/questions/4382582/add-a-year-and-subtract-a-day-using-datepart-in-my-query
WebDec 7, 2010 · Where (DYYYY = (year( getdate() +1)))DatePart(month, GETDATE())) + '/' + DatePart(day, GetDate())) -1 + '/' + DatePart(year, GetDate())) +1) I am having trouble running a query where i can use yesterdays date, but next year for projections. sql. sql-server-2005. date. asked Dec 7, 2010 at 23:02. MyHeadHurts.
DA: 72 PA: 50 MOZ Rank: 66