I am trying to format a date-time value as a military date time group. An example is ‘280900Z Apr 2015’. The ‘Z’ is a military time code letter. Valid values include: A, B, C, D, E, F, G, H, I, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z.
I have no problem formatting the year, month, date, hours, and minutes. My problem arises when I try to use the ‘M’ time code letter. The M is being interpreted as the number of the month rather than as an ‘M’. What I want is ‘280900M Apr 2015’, but what I get is ‘2809004 Apr 2015’.
In my app the user selects a time code letter from another widget which I then use to update the DateTimeInput format string. Here is the code I use to update the format string
$('#startTimeInput').jqxDateTimeInput({
formatString : "ddHHmm" + timeCodeLetter + " MMM yyyy"
});
I have tried escaping the time code letter value and putting it inside single quotes, but neither solved the problem. How can I display the ‘M’ time code letter?
In case it matters, I am using jqxAngular.
Thanks for any help you provide.