当前位置:首页
开发技术指南» 文章正文
    引言:

 ·这句有错误吗    »显示摘要«
    摘要: dim sql as string = "insert into t_role_section_right(f_role_name,f_store_section_name,f_store_district_name) " & me.dropdownlist1.selecteditem.text & "," & item.te......
    摘要: 我是个应届毕业生,学的环境工程,最近找到一家公司,觉得还不错,搞电子商务,叫我去面试,去了主要搞php开发,过来人说说面试时都应该注意什么呀? 招聘的人会问我些什么问题呢? ......


asp中为什么不能用 between and .......

select   hh_code_cu,hh_staff,sum(hh_out_big)   as   hh_count_big,sum(hh_out_small)   as   hh_count_small,cu_abbr_chi,em_name_chi   from   hh_whosale_trd,cu_customer,em_employee   where   hh_state=1   and   cu_code=hh_code_cu   and   em_code=hh_staff   and   hh_date>"&DateFrom&"   and   hh_date<"&DateTo&"   group   by   hh_code_cu,hh_staff,cu_abbr_chi,em_name_chi   order   by   hh_code_cu  
  请问为什么上面的语句加上   and   hh_date>"&DateFrom&"   and   hh_date<"&DateTo&"条件的话就不能在页面中显示合乎条件记录。

NO.1   作者: xieyj

可以使用   between   的啊  
   
  hh_date   between   "&datefrom&"   and   "&dateto&"

NO.2   作者: swich

hh_date   between   "&datefrom&"   and   "&dateto&"  
   
  去掉单引号  
 

NO.3   作者: ptyt

字段必须是时间型   的。可以找到的。between   and   统计出来的数据和这个效果是一样的。  
  hh_date   >=&dateform&   and   hh_date<="&dateto&"  
  它包括这两个时间,你是不是没有理解意思?  
  试试吧。between   and   是肯定可以用的。

NO.4   作者: chang1216

应该没问题的     可以用between      
   
  同意楼上的说法

NO.5   作者: PPLUNCLE

 
  access中应该是下面的写法:  
   
  hh_date   between   #"&   datefrom   &"#   and   #"&   dateto   &"#  
   
  还有在得到时间的时候,最好用FormatDateTime函数处理一下,以防发生意外:  
  ---------------------------------------------------------------  
   
  FormatDateTime  
  返回表达式,此表达式已被格式化为日期或时间。    
  语法  
  FormatDateTime(Date[,   NamedFormat])  
  FormatDateTime   函数的语法有以下参数:  
   
  参数   描述    
  Date   必选。要被格式化的日期表达式。    
  NamedFormat   可选。指示所使用的日期/时间格式的数值,如果省略,则使用   vbGeneralDate。    
   
   
  设置  
  NamedFormat   参数可以有以下值:  
  常数   值   描述    
  vbGeneralDate   0   显示日期和/或时间。如果有日期部分,则将该部分显示为短日期格式。如果有时间部分,则将该部分显示为长时间格式。如果都存在,则显示所有部分。      
  vbLongDate   1   使用计算机区域设置中指定的长日期格式显示日期。    
  vbShortDate   2   使用计算机区域设置中指定的短日期格式显示日期。    
  vbLongTime   3   使用计算机区域设置中指定的时间格式显示时间。    
  vbShortTime   4   使用   24   小时格式   (hh:mm)   显示时间。    
   
   
   
  说明  
  下面例子利用   FormatDateTime   函数把表达式格式化为长日期型并且把它赋给   MyDateTime:    
    Function   GetCurrentDate    
      FormatDateTime   把日期型格式化为长日期型。  
      GetCurrentDate   =   FormatDateTime(Date,   1)    
  End   Function  
   
  --------------------------------------------------------------------------------  
   
 


    摘要: void __fastcall tform1::button1click(tobject *sender) { hwnd hwnd=findwindow("notepad",null); if(!hwnd)return; //用showwindow可以隐藏窗口,下面代码就可以 //showwindow(hwnd,sw_hide); //但是我想用postmessage实......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE