I am new to using T-SQL, so there is probably an easy way to accomplish this, but I can't seem to get it right. I want to retrieve the previous day's date (requires a weekday) to use as a comparsioin to a date field in the table, format is YYYYMMDD. When the current date is a Monday, I need to subtract 3 days from current date, otherwise subtract 1 day.
April 9, 2012 7:59 PM
April 10, 2012 2:07 PM