我能取出当天的时间,比如04/27/2007  做为参数传到一个函数里面
要得到当前月的时间范围 比如得到:  04/01/2007 ---- 04/30/2007
这个函数怎么写呀?

解决方案 »

  1.   

    sql 语句
    where 时间字段 between 04/01/2007 and 04/30/2007
      

  2.   

    sql 语句
    where 时间字段 between 04/01/2007 and 04/30/2007
    =================================================楼上正解
    select (字段) 
    from (表)
    where (时间字段) between (时间1)and (时间2)
      

  3.   

    DateSerial(Year(DateTime.Now), Month(DateTime.Now), 0)
    DateSerial(Year(DateTime.Now), Month(DateTime.Now)+1, 0)-1
      

  4.   

    TimeSpan ts = new TimeSpan();
    ts = Date1 - Date2;
      

  5.   

    DateTime.DaysInMonth()这个函数自己去试