Time format - changes when on Internet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

I have a datagrid with one column formatted for time as follows:
<%# DataBinder.Eval(Container.DataItem, "ReplyDT", "{0:t}")%>

It works fine on my machine, but when I put it up on the Internet, the time
changes to military time; e.g. 19:36 instead of 7:36 PM. Is there a better
way to format this so it will be consistent?
 
Hi Sandy,

The problem occurs because the regional settings are different on the host
machine. I don't know exactly what data type you're trying to format here,
so I'll point you to a comprehensive guide on Formatting on the Microsoft
MSDN .Net Framework SDK online:
 
Back
Top