开发者

Eval/Bind TimeOfDay property without milliseconds?

开发者 https://www.devze.com 2023-01-20 16:18 出处:网络
I\'m trying to format the following: <%# Bind(\"TimeOfDay\",\"{0:HH:mm:ss}\") %> <%# Eval(\"TimeOfDay\",\"{0:HH:mm:ss}\") %>

I'm trying to format the following:

<%# Bind("TimeOfDay","{0:HH:mm:ss}") %>


<%# Eval("TimeOfDay","{0:HH:mm:ss}") %>

<%# Bind("TimeOfDay","{0:HH:mm:ss tt}") %>

But using either of those returns time as f开发者_JAVA百科ollowing:

08:33:08.1430000

How can I only get the 08:33:08 part?

Thanks,

EtonB.


((DateTime)Eval("TimeOfDay")).ToString("HH:mm:ss") ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号