TallGuyinIT
IS-IT--Management
I am not familiar with the SQL program language. I am just trying to make a quick modification to a program. The program is suppose to pull records from 01/01/lastyear to today/lastyear (01/01/2006-05/17/2006). I can tell that the code is not correct based on the data retrieved. Can anyone give me a fix? The current code reads:
WHERE inv_hdr.inv_date >= dateadd(d,-datepart(dy,getdate()-360) + 1,getdate()-360) -- Last years Jan 1.
AND inv_hdr.inv_date <= dateadd(yyyy,-1,getdate()) -- Todays date last year
Thank you
WHERE inv_hdr.inv_date >= dateadd(d,-datepart(dy,getdate()-360) + 1,getdate()-360) -- Last years Jan 1.
AND inv_hdr.inv_date <= dateadd(yyyy,-1,getdate()) -- Todays date last year
Thank you