Formatting time as a duration?

K

Kris Rudin

I have data in a database that lists duration time (hh:mm). If I give it a
string format of {0:t} (short time), a value of 0:55 (55 minutes) shows up
as 12:55 AM, and a value of 1:30 (1 hour 30 minutes) shows up as 1:30 AM.

How can I format this as a true time duration? (It is in the database as
such...)

Thanks.
 
M

Michael Tkachev

Hi,

<%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem,
"InvOrderDate")).ToString("hh:mm")%>


The Best Regards,
Web Developer
Michael Tkachev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top