Show HH: mm 24H format in TemplateField using text property

I am trying to show 24 hour format using this line:

Text='<%# Bind("Appointment", "{HH:mm}")

      

So how will it be created to show, for example, 16:40 instead of 4:40?

+1


source to share


1 answer


if you don't need to link it try:

Text = '<% # string.Format ("{0: HH: mm}", Eval ("Destination"))%>'



Otherwise, suppose you can update the field value in the OnDataBound event.

0


source







All Articles