问题
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 following:
08:33:08.1430000
How can I only get the 08:33:08
part?
Thanks,
EtonB.
回答1:
((DateTime)Eval("TimeOfDay")).ToString("HH:mm:ss")
?
来源:https://stackoverflow.com/questions/3970154/eval-bind-timeofday-property-without-milliseconds