假定那个字段是mydate,数据库为sql serverselect datediff(day,mydate,getdate()) from tablename这个sql的结果取出来就是你要的天数了。
datediff(dd,'20070101',getdate())