Showing results for 
Search instead for 
Did you mean: 

Inconsistent Behavior Time Format String


Maybe someone can explain to me this behavior.

  1. I understand if you use the 24 hr format %H, then the time format specifier will ignore any format settings for %p the AM/PM flag.
  2. NI made this decision and it seems sound, as there is no reason for an AM/PM flag if you have 24 hour format. Even though I agree with their reasoning, I would have preferred to let the user make any foolish decision they want; that is, you should be able to format any way you want.

Now that my gripe is over, this behavior should be throughout not just after. For example the assume the time is 09, the format code %p%H will give AM09, whereas the format code %H%p will give 09.


If %H is going to cause %p to be ignored make it everywhere, not just after.






Rant over

Message 1 of 2
That's interesting. My only thought was that you could display 12-hour and 24-hour time in a single string.
Example "%#I:%m %p / %H%m (24-hour)" -> "3:06 PM / 1506 (24-hour)"
But of course you cannot do it in reverse order, so it seems like a bug.
Message 2 of 2