I have a scheduled task running every hour that is supposed to return records with dates that are 3 days old (or older) and I need it to be considerate of the minutes. The following is an example of the format of the date:
where [yourDateColumn] <= getdate()-3 will return everything 3 days or older. Not sure what you mean "considerate of the minutes". "Older" is relative to a point in time considerate of everything. If what you mean is to disregard certain bits of the time then look at DATEPART to get out the various components and then use DATEADD to remove the bits you are not interested in e.g. this removes milliseconds: select dateadd(ms,-datepart(ms,getdate()), getdate()-3)
I'm not looking to disregard any part of the date...the exact opposite actualy. If the date in the column is 12/10/2012 at 1:05 PM, I don't want it to return that record until 12/13/2012 at 1:05 PM (or after). If this simple where clause will do that:
where [yourDateColumn] <= getdate()-3
...then that's all I need! I was concerned that a simple comparison would start returning this record at 12/13/2012 at 12:01 AM.