User (Legacy) Posted April 13, 2004 Report Share Posted April 13, 2004 Hi, In my chart, I am insterested in changing the display format of time on x-axis to hh am/pm I am using the code written below, but it always makes it hh a0/p0 or a1/p1...and so on. I also tried hh AM/PM and other ways but it just does not work. Can anyone help? chartStandardDay.AxisX.LabelsFormat.CustomFormat = "hh:mm a.m./p.m." Thanks Link to comment Share on other sites More sharing options...
Software FX Posted April 13, 2004 Report Share Posted April 13, 2004 To format time and date values we use standard .NET formatting routines. Please check .NET documentation on "Custom DateTime Format Strings ". You will see that the character designated for A.M./P.M. is 't'. For example: chart1.AxisX.LabelsFormat.CustomFormat = "hh:mm tt"; Will display: 12:00 PM 10:00 AM -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.