How to display time field in hh:mm:ss format

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
gmandelli
User
Posts: 29

How to display time field in hh:mm:ss format

Post by gmandelli »

The table on the mysql database has a time field.

I would like to present the format ih hour, minute and seconds (hh:mm:ss).

How is this possible?

Regards,
John


MichaelG
User
Posts: 1018

Post by MichaelG »

You can use the Row_Rendered server event to format the field. For example:

Field.ViewValue = Convert.ToDateTime(Field.CurrentValue).ToString("HH:mm:ss");

gmandelli
User
Posts: 29

Post by gmandelli »

Ok.

But on insert field the control for time accept only hh:mm and not hh:mm:ss.

How to let user to insert HH.mm:ss in this Time datatype field?

Regards,,
John


Post Reply