C#时间选择
阅读原文时间:2023年07月09日阅读:1
 <asp:Label ID="Label3" runat="server" Text="年份:"></asp:Label>  
             <input class="Wdate" type="text" onclick="WdatePicker()" id="ityear" runat="server">到  
             <input class="Wdate" type="text" onclick="WdatePicker()" id="ityearend" runat="server">(可选任意范围)  
     --------------------------------  
      if (ityear.Value.Length > 0 && ityearend.Value.Length>0)  
        {  
            swhere += " and CreateDate>='" + ityear.Value+ "' " +  
                " and CreateDate < '" + ityearend.Value+ "' ";  
        }  
        if(ityear.Value.Length <= 0 && ityearend.Value.Length <= 0){  
            ityear.Value = "2019-05-01";  
            ityearend.Value = "2019-07-01";  
            swhere += " and CreateDate>='2019-05-01' and CreateDate < '2019-07-01'";  
        }