首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

时间有关问题

2012-03-04 
时间问题有产品生产时间2007-1-1910:47:08生产20吨一次2007-1-1917:41:19生产10吨一次等等现在要求这一天

时间问题
有产品生产时间2007-1-19   10:47:08     生产20吨一次
                            2007-1-19   17:41:19     生产10吨一次
    等等
现在要求这一天整天生产多少产品?(C#/.net)

我该怎么写数据库查询语句.
select   sum(weight_act)/1000   as   sumw1   from   dbv_rrts_rewin   where   MachineName= 'Rewinder   D '   roll_prod_date_time     between     ' "   +   Date.ToString( "yyyy-MM-dd   00:00:00 ")   +   " '   and   ' "   +   Date.ToString( "yyyy-MM-dd   59:59:59 ")   +   " '

      我写的是错的,,该怎么写啊

[解决办法]
楼上说了的,少了个 and

select sum(weight_act)/1000 as sumw1
from dbv_rrts_rewin
where MachineName= 'Rewinder D ' and
roll_prod_date_time between ' " + Date.Date.ToString()+ " 00:00 " + " '
and ' " + Date.Date.ToString()+ " 23:59 " + " '

热点排行