I want to fetch previous day
record from the table using a date field in Sql Server
.
However I'm using the below sql statements but it's not giving any record.
TDTE = CAST(DATEADD(DD,-1,CURRNT_TIMESTAMP) AS DECIMAL(8,0))
OR
TDTE=CAST(DATEADD(DD,-1,GETDATE())AS DECIMAL(8,0))
where TDTE
column is in YYYYMMDD
format.