Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

The date formula should include a time unit

Posted on by Microsoft Employee

Hello,

I am trying to run a customer statement like I normally do every month. When I try to run the report, I get the following error message:

Does anyone know what this means? Is there a fix for this?

Thanks for your help,

Pete

  • Suggested answer
    Gaurav0156 Profile Picture
    Gaurav0156 5 on at
    RE: The date formula should include a time unit

    In 2023 with BC21 I faced the same error. Basically, the code has dataformula used as 'CM' which should be <CM> 

    So, brackets were needed, and it got resolved.

    Thank you - Gaurav Singh

  • rnbergren Profile Picture
    rnbergren 7 on at
    RE: The date formula should include a time unit

    so what does D and WD and M and Q actually stand for?

    Days, Weeks, Minutes?

  • Gretchen Profile Picture
    Gretchen 5 on at
    RE: The date formula should include a time unit

    I'm getting the same error message when trying trying to set up column layout to run a R12M (rolling 12 months) income statement.  I'm using NAV 2009.

    "The date formula 'FY[1] should include a time unit.  Time units can be D, WD, WQ, M, Q, or Y.  C, meaning current time unit based on date, can be specified as a prefix to the time unit."  I'm putting my date FY[1] in the Comparison Period Formula field.  For some reason, this version of NAV doesn't have the Comparison Date Formula field.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: The date formula should include a time unit

    can you run a debugger, and send the screenshot of it where it catches the error

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The date formula should include a time unit

    It looks like the value is indeed 30D. However, this is a swiss company that is trying to run this report. I am not sure if this makes a difference (language difference)?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: The date formula should include a time unit

    When you are running the report what is the value you are using on Length of Aging Periods on the request page of the report ? Looks like it has value of 30T change that to 30D

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The date formula should include a time unit

    Thanks for the reply. Do you know where I have to make this change? Do I do this on the customer card?

  • Verified answer
    RE: The date formula should include a time unit

    Hi,

    If it is in another language, please try to write in English, so the conflicts will be resolved.

    Example: CALCDATE(‘+12M-1T’,BeginnGeschäftsjahr) becomes CALCDATE(‘<+12M-1D>’,BeginnGeschäftsjahr).

    Check the link: noisyvan.wordpress.com/.../avoid-not-a-valid-time-unit-errors-with-multilanguage-calcdates

  • Suggested answer
    RE: The date formula should include a time unit

    Hi,

    Is this report multilingual?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The date formula should include a time unit

    Error Message:

    The date formula '-(30T) should include a time unit.

    Time units can be: D,WD,W,M,Q or Y.

    C, meaning current time unit based on date, can be specified as a prefix to the time unit.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans