简体   繁体   English

日期时间在我的Asp.net网格中提交格式

[英]Date time Filed formate in my Asp.net grid

I am using this formate to display the date time in the grid. 我正在使用此格式来显示网格中的日期时间。 My problem is I am not getting the Exact HH:MM from the database. 我的问题是我没有从数据库中获得Exact HH​​:MM。 Database showing 11:11 but on my grid it showing 11:03.. 数据库显示11:11但在我的网格上显示11:03 ..

Here is the database value : 2013-03-29 11:11:17.570

.Format("{0:MM/dd/yyyy HH:MM  tt}")

Can Any body help me out why I am not getting this Exact HH:MM in my grid? 任何人都可以帮我解释为什么我没有得到这个Exact HH​​:MM在我的网格中?

Thanks 谢谢

hello please use this format 你好,请使用这种格式

"{0:MM/dd/yyyy HH:mm tt}" “{0:MM / dd / yyyy HH:mm tt}”

您使用月份代替分钟应该是小mm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM