Hi,
I have this in my WHERE:
SCH1.App_DtTm between dateadd(week, -7, '2013-02-01') and '2013-02-01'
I am looking for patients with a certain kind of record that is within the last 7 weeks.
I can see patients in the DB with a record dated 12/18/2012 or another one dated 1/2/2013 and these records aren't being selected. (BTW - the dateadd(week, -7, '2013-02-01') evaluates to 12/14/2012). SCH1.Appt_DtTm is a datetime field.
Can someone spot what I am doing wrong here?
TIA!
~rlg
I have this in my WHERE:
SCH1.App_DtTm between dateadd(week, -7, '2013-02-01') and '2013-02-01'
I am looking for patients with a certain kind of record that is within the last 7 weeks.
I can see patients in the DB with a record dated 12/18/2012 or another one dated 1/2/2013 and these records aren't being selected. (BTW - the dateadd(week, -7, '2013-02-01') evaluates to 12/14/2012). SCH1.Appt_DtTm is a datetime field.
Can someone spot what I am doing wrong here?
TIA!
~rlg