Link to home
Create AccountLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

previous date


I want to get only previoudate from mytable1. Orderdate is datetime
select orderdate, amount_ordered from mytabl1 where orderdate is the previousdate
ASKER CERTIFIED SOLUTION
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Or:

select orderdate, amount_ordered
from mytabl1
where CAST(orderdate as DATE) = DATEADD(day,-1,CAST(getdate() as DATE))