cmd.CommandText = "select histdate,AVG(1) as RT,AVG(2) as QT,AVG(3) as RHT, AVG(4) as QHT from ( Select left(time,9) as histdate, 1,2,3,4 from sheet1 order by time) where histdate > Now()-20 Group by histdate ";使用了 order by time 但是最终日期没有按时间排序,
time格式 YYYY/MM/DD HH:MM:SS,只需要取年月日就可以最终时间排序显示 2012/9/10 2012/9/11 2012/9/12 2012/9/13 2012/9/14 2012/9/7 2012/9/8 2012/9/9
想得到的排序按时间显示:2012/9/7 2012/9/8 2012/9/9 2012/9/10 2012/9/11 2012/9/12 2012/9/13 2012/9/14 1.时间选择,目前是9月份取9位,如果到10月份就存在9位和10位的情况,不知如何解决
2.时间排序怎么解决
菜鸟学习中,求详解