Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

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

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

  • Verified answer
    Daniele Rebussi Profile Picture
    Daniele Rebussi 2,480 on at
    RE: Nav2013 R2 Format(date,10,'<Year4>-<Month,2>-<Day,2>') returns 0001-01-01 when date := 0D

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav2013 R2 Format(date,10,'<Year4>-<Month,2>-<Day,2>') returns 0001-01-01 when date := 0D

    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,

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans