vb.net - ASP.Net Listview Eval time format -
i can't seem format right eval statement in label text in template on asp.net listview vb. did try escaping time still resulted in invalid format. data type in sql server bound data time(0).
text='<%# eval("time", "{0:hh:mm tt}") %>'
has run seemingly problem before , found correct format? did research posted @ http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx did not find solution problem.
this 1 had me tearing hair out while... found solution:
the second colon character needs escaped in format string backslash.
try this, should work:
text='<%# eval("time", "{0:hh\:mm}") %>'
Comments
Post a Comment