RadzenChart FormatString: Need single digit hour format

Currently my chart works with a format string of: {0:HH} for my CategoryAxis as the Category is DateTime objects. The X axis has hours in two digits, but I need them in a single digit format (0,1,2,3,etc...).

I have tried {0:H} but that format gives an error. Any ideas?

Thank you

Hello @aliocamlibel,

Use {0:h} instead.

Gives me an error.

Error: Input string was not in a correct format.

According to the Radzen FAQ, one of the tips is:

"Provide as many details as possible. Screenshots, videos and code snippets do miracles and help the community members understand the problem at hand."

According to the following demo this isn't a valid DateTime format string.

Use the Formatter option to return a custom string.

 <RadzenCategoryAxis 
    Formatter=@(value => ((DateTime)value).Hour.ToString()) />

Thanks, I actually got it by setting the FormatString to {0:%H} instead of {0:H}.