c# - Format a TimeSpan string -
in code have :
gvrankings.datasource = rankings.orderby(rg => rg.swimtime).take(100).toarray(); gvrankings.databind();
(swimtime here timespan
)
at frontside have
< asp:templatefield headertext="tijd" itemstyle-cssclass="time" headerstyle-cssclass="smallheader"> < itemtemplate><%# ("swimtime")%>< /itemtemplate> < /asp:templatefield>
i format swimtime hh:mm:dd.ff
have (after 2 hours of trying) absolutely no idea how this.....
string.format("{0:hh\\:mm\\:dd\\.ff}", yourtimespan)
Comments
Post a Comment