c# - TimeSelector detecting only PM instead of Am -


i have database table 2 columns time1 , time2 respectively.time1 contains 08:00 (08:00:00.000) , time2 contains 17:30(17:30:00.000).time1 , time2 database field's datatype datetime have code like

protected void txtdate_textchanged(object sender, eventargs e)     {           datetime time1 = datetime.parseexact(txtdate.text,"dd-mm-yyyy",cultureinfo.invariantculture);         string time4 = time1.tostring("yyyy-mm-dd");         str = "select timein,timeout musterroll empcode='" + ddcode.selecteditem.text + "' , date='"+time4+"'";         dr = conn.query(str);         if (dr.read())         {             datetime time = dr.getdatetime(0);             timeselector1.settime(time.hour, time.minute, timeselector1.ampm);             datetime time2 = dr.getdatetime(1);             timeselector2.settime(time2.hour, time2.minute, timeselector2.ampm);         }      } 

code works timeselector1 shows 20:00 instead of 08:00 time2 shows correct 17:30 time. how code detects pm? timeselector1 source ocde is

 <tr>       <td align="left" class="style2">       punch i</td>       <td align="left">      <asp:updatepanel id="updatepanel5" runat="server">      <contenttemplate>      <div class="input-prepend" title="update punch i" data-rel="tooltip">      <cc1:timeselector id="timeselector1" runat="server" displayseconds="false"        selectedtimeformat="twentyfour">      </cc1:timeselector>      </contenttemplate>      </asp:updatepanel>      </td>   </tr> 


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -