2007-3-3 | 53 | 2007-7-11 5:20 | 2007-7-11 5:37 |
2005-1-1 | 65 | 2007-7-19 11:58 | 2007-7-20 12:03 |
2007-3-1 | 56 | 2007-7-16 12:18 | 2007-7-16 12:32 |
2006-9-9 | 2 | 2007-7-12 2:14 | 2007-7-12 2:27 |
2006-1-15 | 80 | 2007-7-15 11:27 | 2007-7-15 12:14 |
2004-12-14 | 24 | 2007-7-17 11:05 | 2007-7-17 11:32 |
2005-1-17 | 28 | 2007-7-15 10:23 | 2007-7-15 10:37 |
原来显示为12进制的时间,可是因为需要,要改为24小时,在网上查询好多,都没有找到. 下面是原来的代码:
<asp:BoundColumn DataField="ADMISSION_DATE_TIME" HeaderText="入院时间" DataFormatString="{0:yyyy-MM-dd hh:mm }"></asp:BoundColumn>
<asp:BoundColumn DataField="ADM_WARD_DATE_TIME" HeaderText="入科时间" DataFormatString="{0:yyyy-MM-dd hh:mm }"></asp:BoundColumn>
后来,根据C#的做法,我试着将hh改为HH后又试了试,果然,问题解决
2007-3-3 | 53 | 2007-7-11 17:20 | 2007-7-11 17:37 |
2005-1-1 | 65 | 2007-7-19 23:58 | 2007-7-20 0:03 |
2007-3-1 | 56 | 2007-7-16 12:18 | 2007-7-16 12:32 |
2006-9-9 | 2 | 2007-7-12 2:14 | 2007-7-12 2:27 |
2006-1-15 | 80 | 2007-7-15 11:27 | 2007-7-15 12:14 |
2004-12-14 | 24 | 2007-7-17 11:05 | 2007-7-17 11:32 |
2005-1-17 | 28 | 2007-7-15 10:23 | 2007-7-15 10:37 |
改后HTML代码如下:
<asp:BoundColumn DataField="ADMISSION_DATE_TIME" HeaderText="入院时间" DataFormatString="{0:yyyy-MM-dd HH:mm }"></asp:BoundColumn>
<asp:BoundColumn DataField="ADM_WARD_DATE_TIME" HeaderText="入科时间" DataFormatString="{0:yyyy-MM-dd HH:mm }"></asp:BoundColumn>