How do I format the DateTimeAxis label in OxyPlot as the string "hh AM / PM"?
I am trying to format a DateTimeAxis shortcut in hh AM / PM formatted string. Does anyone know how to format DateTimeAxis in hh AM / PM? They allow these formatting styles in their documentation.
yyyy year "2011"
yy year "11"
MM month "01"
MMM month "Jan"
MMMM month "January"
w week number "4"
ww week number "04"
dd day "26"
hh hour "04"
HH hour "16"
mm minute "37"
ss seconds "23"
yyyy-MM-dd "2011-01-26"
MM/dd/yyyy "01/26/2011"
+3
source to share
1 answer
You can use tt
from Custom Date and Time Format Strings (as Ben already pointed out).
When it DateTimeAxis
formats a value, it passes your formatstlye to String.Format
( Source ) - so any valid format string should work.
0
source to share