Date/Time Format

G

Guest

When I use the following expression

DataBinder.Eval(Container.DataItem,"PM_CUTOFF_PERIOD", "{0:MM/dd/yyyy HH:mm tt}"

It displays my date and time as follows
05/18/2004 14:00 P

How do I get it to show me 2:00 PM instead of 14:00 PM?
 
V

Val Mazur

Hi Jim,

Change capital HH to hh and formatting should be in a 12 hours format
 

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

Top