我在 table 中有一个passed_date
列,我想找到这个日期和当前日期之间的差异,并且必须检查这个差异是否>365days?例如,“passed_date”列由 09/26/2013 09:16:48.000 PM 组成。我怎样才能找到日期之间的差异?
sqlcommand cmd = new sqlcommand("select passed_date from table");
cmd.executereader();
dr.read();
sring date1 = stdr[0].tostring();
string date2 = DateTime.Now.ToString();