Date format as MM/YYYY

RoelofRoelof Member Posts: 364
Older NAV versions were able to define customized date formats in CU-1. Currently in newer versions like NAV2018 and 365 BC, after Microsoft has redefined CU's, these formats suppose to be handled in CU-45. By using table field properties 'AutoFormatType' and 'AutoFormatExpr' and related code in CU-45 (function AutoFormatTranslate) as:
Case AutoFormatType of
3: Exit('<Month,2>/<Year4>'))

But it's not working the same. As a matter of fact it's not doing anything.
Are there any other ways to get the same result? This should be for displayed fields and fields which can be modified.

Roelof de Jong


  • TallyHoTallyHo Member Posts: 369
    edited 2019-11-18
    As far as I know, the AutoFormat functionality in NAV/BC only works for Decimal fields.
    It will not be triggered when you use a Date field. I added your code (3: Exit('<Month,2>/<Year4>'))) to cu1 in a classic NAV 2009 database, and it isn't even working there. How old were these nav versions? Or am I missing something here..
Sign In or Register to comment.