var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Date Difference
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.
Can you just run a single datediff statement for both databases like this?
WHERE DATEDIFF(d, cst.DateCreated, (GETDATE() - 1)) = 0
Is this other DB sitting in a different time zone? What do you get for
on both servers?