How to write a date range condition

时间:2017-07-10 15:29:09

标签: date date-range

How would I write the date range condition correctly for the following query: list all instruments from table "asset", where the "maturity_dt" > 1 year:... in English it sounds like :" AND asset.maturity_dt >= Today + 365.."

1 个答案:

答案 0 :(得分:0)

如果您使用MySQL,则需要查询,

Select * from asset where DATEDIFF(maturity_dt, now())>365;