views:

370

answers:

1

Hi there, im trying to show a 24 hours format using this line:

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

So how it'll be formated for showing for example 16:40 instead 4:40 ? thanks in advance

A: 

if you don't need to bind it, try:

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

otherwise i suppose you can update the field value in the OnDataBound event.

ajh1138
it still showing like 12 hours format, im want to show in 24h format
Angel Escobedo
sorry i fix it im rowdatabound, thanks !
Angel Escobedo