where clause
に条件をもう 1 つ追加します
SELECT * FROM product WHERE pdate >= DATEADD(day,-30,GETDATE()) and pdate <= getdate()
プレ>または
DateDiff
を使用しますSELECT * FROM product WHERE DATEDIFF(day,pdate,GETDATE()) between 0 and 30
プレ>
where clause
に条件をもう 1 つ追加します
SELECT * FROM product WHERE pdate >= DATEADD(day,-30,GETDATE()) and pdate <= getdate()
プレ>または
DateDiff
を使用しますSELECT * FROM product WHERE DATEDIFF(day,pdate,GETDATE()) between 0 and 30
プレ>