Getdate(), -1 day
In T-SQL (sqlserver) you can simply do :
getDate()-1
The function substracts (days) as standard.
The CAST depends on what kind of date type you need. If you need only to compare dates you can use only:
dateadd(DD, -1, cast(getdate() as date))
If you need to compare with date time you can use:
dateadd(DD,-1,getdate())
That wil give you datetime like this: 2016-01-11 10:43:57.443
Or you can try this without making it any more difficult?
CAST(GETDATE()-1 as date )