Time format on List Page Field

On start and end time fields of this list page times are entered in military time.

NAV is automatically converting the times from military 24hr to standaard 12 hr format.

How can I disable this feature?

In other words, users enter a time in military format on a list page and they would liek it to remain in that format but the lsit page is auto converting the time to standard.



Think there is no way other than changing your system’s regional settings.

Please check:-

Why doesn’t the validation trigger of the field in question work as a place for code to convert standard back to military?

Or is it just an under the hood setting that we have no control over as devs?

Well if it’s only a matter of the display a single time in NAV as 24-hour/military format in a single page, then you could still do it. Even if you don’t change the regional settings of the client.
You would “just” have to make users enter the time into a text field, and then you format and verify is in the back ground. Just an idea, if a single page or two.

The FIN.STX file manages the different formats used inside NAV - and a lot more. But unless you run a very old classic version, then you’re not able to change this file as it is check-sum controlled.

Hey Erik,

The change is on a single page. I’m working on NAV 2016.

If I’m understanding correctly you’re suggesting to change the page to a text format. Then within the on validate trigger for that field I’d format the text to Military?

The change is only a cosmetic one in that the users just want to see the military time the enter on a List Page. I don’t want to alter too much if I can avoid it.

Thanks for your insight!

Hi Rob,

Yes you correct. If this really is a “must do” even if cosmetic, then you can do it. I would start by trying to convince them not to do this, as it really is a “stupid thing” (you may want to use a different wording [;)]). Everywhere else

But you could create a new string variable which you could ensure would be formatted in the military format. This could be done in the OnAfterGetCurrRecord trigger. And then you would need to create code on the page control with the text variable. In the onValidate trigger of the control, you can evaluate it by validating it against the your “internal” Time field (stored in time format). Remember to save the record, if the time is changed. The page will not send a “MODIFY” if you just changed a field in the background, only when changed in the page. And as you only change the variable in the page, then it will not trigger a modify.

Btw. I can recommend you to read this blog post by David Singleton:[View:~/nav/b/singleton/posts/the-most-powerful-tool-that-a-dynamics-nav-consultant-can-use:1040:50] - a great read even if it has been a few years since it was written. A skill every NAV consultant/developer need to develop,