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 :
Small and medium business | Business Central, N...
Suggested Answer

Finding Current Half year from Input Date

(0) ShareShare
ReportReport
Posted on by 175

Hi,

'1D+CM' = one day + Current month

'1D+CY' = one day + Current year

'1D+CQ' = one day + Current quarter

How to Find current half year based on above formulas

i.e Current Half year from any input date b/w 01/01/2020 - 30/06/2020 is 30/06/2020

Current Half year from any input date b/w 28/09/2020 - 05/01/2021 is 31/12/2020

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi Ali Hamza ,

    Can you please try with Calcdate('<6M>',010120D); ?

    Thanks.

  • AliHamza Profile Picture
    175 on at

    No, it doesn't work. If Input date is 03042020 then it fails

  • Suggested answer
    AliHamza Profile Picture
    175 on at

    Hi Guys,

    i found the solution:

    if DATE2DMY(InputDate, 2) < 6 then

                       OutputDate := CALCDATE('-CY+6M-1D', InputDate)

                  else

                       OutputDate := CALCDATE('-CY+12M-1D', InputDate)

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans