如何找到存储在同一行 mysql 的 2 列中的日期差异
how to find the difference in dates stored in 2 columns of mysql of same row
dtchkt=obj.next();
String ddf;
rs=st.executeQuery("select datediff(dtchkt,dtchki) where id="+id);
while(rs.next())
{
ddf=rs.getString(1);
System.out.println(ddf);
}
上面的代码无法找到两列日期之间的差异实际上我希望代码 return column.Please 的两个指定日期之间的天数建议一个可能的解决方案。
rs=st.executeQuery("select datediff(dtchkt,dtchki) FROM `table_name` where id="+id);
dtchkt=obj.next();
String ddf;
rs=st.executeQuery("select datediff(dtchkt,dtchki) where id="+id);
while(rs.next())
{
ddf=rs.getString(1);
System.out.println(ddf);
}
上面的代码无法找到两列日期之间的差异实际上我希望代码 return column.Please 的两个指定日期之间的天数建议一个可能的解决方案。
rs=st.executeQuery("select datediff(dtchkt,dtchki) FROM `table_name` where id="+id);