Dear All,
we have 2 db and i try to retrview yesterdays records from both db,i used
where cst.DateCreated >=DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0)AND cst.DateCreated <DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)
In one DB its pull exactly yesterday record and in another DB it pulls day before yesterday records.Why this difference and how to fix this.Any help will be highly appreciated.Many Thanks.
Reagrds,
SG
we have 2 db and i try to retrview yesterdays records from both db,i used
where cst.DateCreated >=DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0)AND cst.DateCreated <DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)
In one DB its pull exactly yesterday record and in another DB it pulls day before yesterday records.Why this difference and how to fix this.Any help will be highly appreciated.Many Thanks.
Reagrds,
SG