web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Nav2013 R2 Format(date,10,'<Year4>-<Month,2>-<Day,2>') returns 0001-01-01 when date := 0D

(0) ShareShare
ReportReport
Posted on by 150
Hi When formating a blank date, with the code shown below it returns: 0001-01-01 in Nav2013 R2. If the same code is executed in Nav2013 it returns: ''. That must be an error in Nav2013 R2, or what? Code: Var Name DataType Subtype Length Employee2 Record Employee ApplicationManagement Codeunit ApplicationManagement txtTerminationDate Text dtDate Date txtDate Text Employee2.GET('9'); txtTerminationDate := FORMAT(Employee2."Termination Date",10,'--'); MESSAGE('Employee2."Termination Date": %1\'+ 'txtTerminationDate: %2\'+ 'ApplicationManagement.ApplicationVersion: %3', Employee2."Termination Date", txtTerminationDate, ApplicationManagement.ApplicationVersion); dtDate := 0D; txtDate := FORMAT(dtDate,10,'--'); MESSAGE('dtDate: %1\'+ 'txtDate; %2\'+ 'ApplicationManagement.ApplicationVersion: %3', dtDate, txtDate, ApplicationManagement.ApplicationVersion);

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    About two weeks ago I have translate this issue to Microsoft support. Microsoft is working to fix this problem in next hotfix in Nav2013 R2.

    Best regards,

  • Verified answer
    Daniele Rebussi Profile Picture
    2,480 on at

    Has been fixed with Cumulative Update 6: mbs2.microsoft.com/.../KBDisplay.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans